Declaring downstream exposures for a model
Exposures let you document downstream uses of your dbt project—like dashboards, notebooks, or applications—directly in your dbt project so that lineage and impact analysis extend beyond models into the tools that consume them. They are defined in YAML and appear in the dbt docs DAG, helping teams understand what breaks if an upstream model changes.
1 · Learn the must-know
- Exposures are defined in YAML files (typically under an exposures: key) and can live in any .yml file within your models directory, not just a dedicated exposures.yml.
- Each exposure requires a name, type (dashboard, notebook, analysis, ml, or application), owner (with name and/or email), and a
depends_onlist referencing models, seeds, or snapshots via ref() or sources via source(). - Exposures show up as distinct nodes in the DAG and dbt docs site, enabling stakeholders to trace which exposures depend on a given model and assess downstream impact before making changes.
- The
depends_onfield must use ref() or source() function syntax (not hardcoded table names) so dbt can resolve the dependency graph correctly and include exposures in selection syntax like dbt run --select +exposure:my_dashboard. - Exposures do not run any code themselves—they are purely metadata/documentation nodes and have no compiled SQL or materialization.
- Common gotcha: forgetting to update or remove exposures when a downstream tool is deprecated leads to stale lineage information that misrepresents actual dependencies in dbt docs.
2 · Check your understanding
A dbt project defines the following exposure:
exposures:
- name: weekly_jaffle_report
type: dashboard
maturity: high
url: https://bi.tool/dashboards/1
depends_on:
- ref('fct_orders')
- ref('dim_customers')
owner:
name: Callum McData
email: [email protected]
You want to build fct_orders, dim_customers, and everything those two models depend on, using the exposure's own lineage instead of typing out each model name. Which command does this?
What you have tried across dbt Analytics Engineering's objectives, not a readiness score.
Developing and optimizing dbt models45.16% of the exam*0 of 14 tried
Managing dbt models governance9.68% of the exam*0 of 3 tried
Debugging data modeling errors16.13% of the exam*0 of 5 tried
Troubleshooting and optimizing dbt pipelines6.45% of the exam*0 of 2 tried
Implementing dbt tests9.68% of the exam*0 of 3 tried
Implementing and maintaining external dependencies6.45% of the exam*0 of 2 tried
Leveraging the dbt state6.45% of the exam*0 of 2 tried
* Our estimate. dbt Labs publishes no section weights.
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.