errors.ColumnSchemaError

A frame’s columns or dtypes do not match the schema.

Usage

Source

errors.ColumnSchemaError(
    schema_name,
    problems,
    *,
    stored=False,
)

This is a bug in the pipeline, not bad data, so the run fails before Schema.filter runs, and the asset writes nothing.

Attributes

problems: Sequence[Mapping[str, str]]
One mapping of column, expected and actual per mismatched column.

Methods

Name Description
__init__() Name each mismatched column with its expected and actual dtype.

__init__()

Name each mismatched column with its expected and actual dtype.

Usage

Source

__init__(schema_name, problems, *, stored=False)
Parameters
problems: Sequence[Mapping[str, str]]

One mapping of column, expected and actual per mismatched column, as _find_column_schema_problems returns.

stored: bool = False
Whether the frame is a table read back from storage, as in dd.build_rule_checks, where no asset body exists to cast in.