Skip to main content

Cross-Source Fill Rate Check

The cross_source_fill_rate check validates that a column has a matching fill-rate (percentage of non-NULL values) across the same table on two different datasources.

Configuration​

ParameterRequiredDescription
nameYesUnique name for the check
datasourceYesThe primary datasource
datasetYesTable name (or list of table names) on the primary datasource
typeYesMust be cross_source_fill_rate
dimensionsYesList of columns to compare fill-rate on (applied to every table pair)
compare_datasourceYesThe second datasource to compare against
compare_datasetYesTable name (or list of table names) on compare_datasource, zipped pairwise with dataset
conditionYesComparison operator, applied to the relative fill-rate difference
thresholdNoMaximum allowed relative difference (default: 0)
filterNoWHERE clause conditions, applied to both sides

dataset and compare_dataset are paired by position, same as cross_source_row_count. dimensions names are assumed to match on both sides.

Metric​

For each table pair and each dimension, the check computes each side's fill-rate (non-null count / total count), then the relative difference between the two:

actual_value = abs(fill_rate_a - fill_rate_b) / max(fill_rate_a, fill_rate_b)

A value of 0 means both sides have identical fill-rates. If both sides have a fill-rate of 0, the check reports 0 (considered a match).

Examples​

Exact match required​

- name: customers_fill_rate_parity
datasource: warehouse
dataset: customers
type: cross_source_fill_rate
dimensions: [email, phone]
compare_datasource: source_db
compare_dataset: customers
condition: eq
threshold: 0

Allow a small drift​

- name: customers_fill_rate_parity_tolerant
datasource: warehouse
dataset: customers
type: cross_source_fill_rate
dimensions: [email, phone]
compare_datasource: source_db
compare_dataset: customers
condition: le
threshold: 0.05 # allow up to 5% relative difference in fill-rate

Behavior​

  • One result per table pair per dimension: e.g. two table pairs with two dimensions each produce four results.
  • Naming convention: results are named {original_name}_{primary_table}__vs__{compare_table}__{dimension}.
  • Both connections must be configured: datasource and compare_datasource must both exist under datasources in the config.