Skip to content

Dialect

Here is a list of available actions for Table Dialect:

  • check_dialect -- check the descriptor against JSON Schema(s)

Reference

dplib.actions.dialect.check.check_dialect(dialect)

Check the validity of a Table Dialect descriptor

This validates the descriptor against the JSON Schema profiles to ensure conformity with Data Package standard and Data Package extensions.

Parameters:

Name Type Description Default
dialect Union[str, IDict, Dialect]

The Table Dialect descriptor

required

Returns:

Type Description
List[MetadataError]

A list of errors

Source code in dplib/actions/dialect/check.py
def check_dialect(dialect: Union[str, types.IDict, Dialect]) -> List[MetadataError]:
    """Check the validity of a Table Dialect descriptor

    This validates the descriptor against the JSON Schema profiles to ensure
    conformity with Data Package standard and Data Package extensions.

    Parameters:
        dialect: The Table Dialect descriptor

    Returns:
        A list of errors
    """
    if isinstance(dialect, Dialect):
        dialect = dialect.to_dict()
    return check_metadata(dialect, type="dialect")