Source freshness checks whether raw source tables were updated recently enough. Not a row-level data test. Think of it as an SLA on how stale landing data is allowed to be.
Configure in sources YAML
sources:
- name: stripe
database: raw
schema: stripe
freshness:
warn_after: { count: 6, period: hour }
error_after: { count: 12, period: hour }
loaded_at_field: _loaded_at
tables:
- name: paymentsdbt queries max(loaded_at_field) (or warehouse metadata when configured) and compares it to warn_after / error_after.
Run it
dbt source freshness # often in CI / morning jobs before dbt build
Mental model
EL job should land rows with _loaded_at ≈ now
|
v
dbt source freshness checks max(_loaded_at)
|
ok / warn / error vs SLA windowsWhy teams use it
- Catch broken Fivetran/Airflow loads before transforming garbage or empty days
- Separate "pipeline late" from "transform logic wrong"
- Document expectations next to the source definition
Interview tip: "Freshness guards the EL boundary; schema tests guard the transform contracts. I fail the job on error_after for revenue-critical sources."