elementary.data_freshness_slaVerifies that data in a model was updated before a specified SLA deadline time.This test checks the maximum timestamp value of a specified column in your data to determine whether the data was actually refreshed before your deadline. Unlike freshness_anomalies (which uses z-score based anomaly detection as a dbt test, or ML-based detection in Elementary Cloud), this test validates against a fixed, explicit SLA time, making it ideal when you have a concrete contractual or operational deadline.Unlike execution_sla (which only checks if the dbt model ran on time), data_freshness_sla checks whether the actual data is fresh. A pipeline can run successfully but still serve stale data if, for example, an upstream source didn’t update. This test catches that.
The timestamp_column values are assumed to be in UTC (or timezone-naive timestamps that represent UTC). If your data stores local timestamps, the comparison may be incorrect.
If both day_of_week and day_of_month are set, the test uses OR logic (checks if either matches)
The test passes if the SLA deadline hasn’t been reached yet, giving your data time to be updated