Cross-table reconciliation (totals match)¶
cross_table_reconciliation - Column-level - Common column checks
Validates that an aggregate over a column matches the same aggregate in another table.
Parameters¶
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
reference_table |
str | none | Yes | The table to compare against. |
aggregate |
str | 'sum' |
No | How to aggregate the compared column. One of: sum, count, min, max, avg. |
reference_column |
str | none | No | Column in the reference table to aggregate. Required for sum, min, max, and avg; optional for count. |
tolerance |
float | 0.0 |
No | Absolute tolerance allowed for the difference. |
tolerance_percent |
float | 0.0 |
No | Relative tolerance, e.g. 0.1 for 0.1%. |
YAML example¶
checks:
- name: example_cross_table_reconciliation
check_type: cross_table_reconciliation
table_name: schema.table
column_name: example_column
parameters:
reference_table: <reference_table>
aggregate: sum
tolerance: 0.0
tolerance_percent: 0.0
See YAML check format for the full field reference.