Glossary

What is data freshness?

Data freshness is how up to date a table is: the time since its last successful update, or since the newest row it contains. A table is stale when that age exceeds what its consumers expect, such as a daily report built on data that hasn't loaded in two days.

Two ways to measure it

Freshness can be measured from the data or from the pipeline. Data-based checks look at the newest timestamp in the table, such as max(updated_at) or max(_loaded_at). Pipeline-based checks look at when the job that builds the table last succeeded. They catch different failures.

MeasureCatchesMisses
Newest row (max of a timestamp column)A source that stopped sending data while the job keeps runningTables without a reliable timestamp column
Last successful buildFailed or skipped pipeline runsA job that succeeds but loads nothing new

Freshness is a contract, not a single number. An hourly dashboard and a monthly finance report on the same table tolerate different ages, so checks usually have two thresholds: warn after one age, error after a longer one.

A freshness check in SQL

This DuckDB query checks the newest row against a 26-hour warning and a 2-day error threshold. The current time is a literal so the example is reproducible; in production it would be now().

DuckDB
SELECT max(updated_at)                                   AS newest_row,
       TIMESTAMP '2026-11-23 09:00:00' - max(updated_at)  AS age,
       CASE
         WHEN max(updated_at) < TIMESTAMP '2026-11-23 09:00:00' - INTERVAL 2 DAY  THEN 'error'
         WHEN max(updated_at) < TIMESTAMP '2026-11-23 09:00:00' - INTERVAL 26 HOUR THEN 'warn'
         ELSE 'ok'
       END                                               AS status
FROM orders;

With the newest row at 2026-11-22 06:00, the age is 1 day 03:00:00 and the status is warn. A 26-hour threshold rather than 24 leaves room for a daily job that runs a little late. dbt has the same check built in for sources:

dbt (models/sources.yml)
sources:
  - name: sales
    loaded_at_field: updated_at
    freshness:
      warn_after: {count: 26, period: hour}
      error_after: {count: 2, period: day}
    tables:
      - name: orders

Why freshness matters

Stale data rarely fails loudly. A dashboard built on yesterday's table still renders, with numbers that look plausible. Without a check, people notice only when a figure contradicts something they already know. A freshness check turns that into an alert with a time and a table name.

Freshness also propagates. In a medallion architecture or any chain of models, a report table is never fresher than the oldest input it depends on, which is why data lineage and freshness are usually read together.

In Thunderduck

In a Thunderduck pipeline, freshness rules live in thunderduck.yml next to the schedule: each rule names a dbt model and sets warn_after and/or error_after, such as 26h or 2d. Thunderduck reports each model's time since its last successful production build as ok, warn, error, or unknown if it has never built. A rule crossing warn or error opens an alert, and Slack gets one message when it opens, one when it escalates and one when it recovers.

AI assistants read the same status: the MCP get_freshness tool returns, for every model with a rule, when it last built in production, its age and its status, so an agent can check freshness before it quotes a number.

Docs: https://docs.thunderduck.ai/data/pipelines/

Related terms

Query the data where it lives.

Databases, warehouses and buckets in one SQL statement, from SQL clients, BI tools and AI agents.