Freshness (e.g. updated within N hours)¶
date_freshness - Column-level - Date and time
Validates that a date or datetime column has recent values, catching data that has gone stale.
Parameters¶
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
max_age_hours |
float | 24.0 |
No | Maximum allowed age in hours from now. |
check_latest |
bool | True |
No | If true, compare the most recent value. If false, compare the percentage of stale rows against threshold_percent. |
threshold_percent |
float | 0.0 |
No | When check_latest is false, fail if the percentage of stale rows exceeds this. |
YAML example¶
checks:
- name: example_date_freshness
check_type: date_freshness
table_name: schema.table
column_name: example_column
parameters:
max_age_hours: 24.0
check_latest: true
threshold_percent: 0.0
See YAML check format for the full field reference.