Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
dbt Labs · dbt Analytics Engineering

Exposures and Source Freshness

dbt Analytics Engineering · Lesson 16 of 17 · 2:00:43

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the dbt Analytics Engineering Certification exam. In this lesson: exposures and their required properties, selecting with exposures, source freshness with loaded_at_field, warn_after, and error_after, and running freshness checks with dbt source freshness. Includes three original practice questions, with Orchardline Meal Kits, a fictional meal-kit company, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Saturday's numbers on Tuesday

On Tuesday, Orchardline's finance dashboard still showed Saturday's numbers, because the raw orders had stopped loading, and no check noticed. Worse, nobody could tell which dbt models that dashboard depended on, or who owned it. This lesson covers exposures, which declare who uses your models, and source freshness, which warns you when raw data stops arriving.

Exposures

An exposure describes a downstream use of your dbt project, like a dashboard, a notebook, an analysis, a machine learning model, or an application. It is defined in YAML, under an exposures key, in the models folder, with three required properties: a name in snake case, a type, and an owner, with a name or an email. Its depends on list names the models, sources, or metrics that it reads, with ref, source, or metric. Optional properties add a label, a URL to the dashboard, a description, and a maturity of high, medium, or low. The exposure then appears as a node at the end of the DAG, and gets its own page in the documentation site, so consumers and owners are visible.

Selecting with exposures

Because an exposure sits in the DAG, you can select everything that feeds it, with the exposure method, and a plus sign before it. For example, dbt build with plus exposure, then the exposure name, rebuilds and tests every model that the finance dashboard reads, and nothing else. Exposure properties are set only in YAML: you cannot set them in dbt project dot yml, or in a config block, except enabled. Keep each owner and depends on list up to date, since a stale exposure points people to the wrong team, or hides a dependency.

Source freshness

Source freshness checks how recently raw data arrived, from a timestamp column named in loaded at field, or from warehouse metadata when no column is given. Under the source's config, freshness sets warn after and error after, each with a count and a period, in minutes, hours, or days. Settings on a source apply to all its tables, a table can override them, and freshness set to null turns the check off for one table. A filter can limit the rows that the freshness query scans, which helps on very large tables. In dbt one point eleven, the dbt source freshness command runs the checks, and writes the results to sources dot json, in the target folder.

Running freshness checks

Run the checks on a schedule, and keep the results, so you are alerted when a source misses its target, and can follow freshness over time. In a dbt platform job, you can turn on source freshness in the job's execution settings. With state, the source status fresher selector then builds only what depends on sources that received new data, as lesson seventeen explains. Freshness tells you that data stopped arriving, while data tests tell you that the data that did arrive is wrong: you need both. And exposures complete the picture: when a source is stale, they show which dashboards and owners are affected.

Recap

Let's recap. An exposure declares a downstream use, like a dashboard, with a name, a type, an owner, and a depends on list. It appears in the DAG and in the docs, and plus exposure selects everything that feeds it. Source freshness compares the latest loaded timestamp with the warn after and error after thresholds. Table settings override source settings, and null turns a check off. And dbt source freshness runs the checks, best on a schedule, with the results in sources dot json.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. An exposure for the churn notebook has a name, a type, and a depends_on list. Which required property is missing?

    • url
    • owner
    • maturity
    • label
    Show the answer

    owner

    Name, type, and owner are required, and the owner needs at least a name or an email. “url” is wrong, since the URL is optional. “maturity” is wrong, since maturity is optional too. And “label” is wrong, since a label is only a friendlier display name.

  2. The orders source sets warn_after: 6 hours and error_after: 24 hours, and its latest row arrived 10 hours ago. What does dbt source freshness report?

    • A warning: past six hours, but under twenty-four
    • An error, since it is older than six hours
    • A pass, since it is newer than twenty-four hours
    • Nothing, until twenty-four hours have passed
    Show the answer

    A warning: past six hours, but under twenty-four

    Ten hours is past the warn after threshold, but not yet past the error after threshold, so the table is reported with a warning. “An error, since it is older than six hours” is wrong, since an error needs twenty four hours. “A pass, since it is newer than twenty-four hours” is wrong, since a warning starts after six hours. And “Nothing, until twenty-four hours have passed” is wrong, since the warning threshold has already been crossed.

  3. The recipes table is a static list, loaded once a year, and its freshness warnings are noise. The other tables must keep their checks. What should the team do?

    • Remove the freshness block from the whole source
    • Set error_after to one year on the source
    • Drop the recipes table from the source
    • Set freshness: null on the recipes table
    Show the answer

    Set freshness: null on the recipes table

    Freshness set to null on one table turns its check off, while the source level settings still apply to the other tables. “Remove the freshness block from the whole source” is wrong, since the other tables would lose their checks. “Set error_after to one year on the source” is wrong, since a source level setting changes every table. And “Drop the recipes table from the source” is wrong, since models could no longer read the table with source.