pudl_diff.schema
¶
Comparing the schemas of two tables.
SchemaDiff
dataclass
¶
The difference between two table schemas.
Column order is not considered significant, per PUDL Diff's definition of "functionally identical" tables.
Source code in src/pudl_diff/schema.py
dtype_changes
instance-attribute
¶
Maps column name to a (left_dtype, right_dtype) pair, for columns
present in both schemas but with differing dtypes.
is_identical
property
¶
Whether the two schemas have the same columns and dtypes.
left_column_count
instance-attribute
¶
Total number of columns in the left schema.
right_column_count
instance-attribute
¶
Total number of columns in the right schema.
compare_schemas(left, right)
¶
Compare two table schemas.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
left
|
Schema
|
Schema of the "left" table, e.g. from
|
required |
right
|
Schema
|
Schema of the "right" table, to compare against |
required |