Add Exposures to your DAG
Exposures make it possible to define and describe a downstream use of your dbt project, such as in a dashboard, application, or data science pipeline. By defining exposures, you can then:
- run, test, and list resources that feed into your exposure
- populate a dedicated page in the auto-generated documentation site with context relevant to data consumers
Exposures can be defined in two ways:
- Manual — Declared explicitly in your project’s YAML files.
- Automatic — dbt Cloud creates and visualizes downstream exposures automatically for supported integrations, removing the need for manual YAML definitions. These downstream exposures are stored in dbt’s metadata system, appear in dbt Explorer, and behave like manual exposures. However, they don’t exist in YAML files.
Declaring an exposure
Exposures are defined in .yml
files nested under an exposures:
key.
The following example shows an exposure definition in a models/<filename>.yml
file:
models/<filename>.yml
version: 2
exposures:
- name: weekly_jaffle_metrics
label: Jaffles by the Week
type: dashboard
maturity: high
url: https://bi.tool/dashboards/1
description: >
Did someone say "exponential growth"?
depends_on:
- ref('fct_orders')
- ref('dim_customers')
- source('gsheets', 'goals')
- metric('count_orders')
owner:
name: Callum McData
email: data@jaffleshop.com
Available properties
Required:
- name: a unique exposure name written in snake case
- type: one of
dashboard
,notebook
,analysis
,ml
,application
(used to organize in docs site) - owner:
name
oremail
required; additional properties allowed
Expected:
- depends_on: list of refable nodes, including
metric
,ref
, andsource
. While possible, it is highly unlikely you will ever need anexposure
to depend on asource
directly.
Optional:
- label: May contain spaces, capital letters, or special characters.
- url: Activates and populates the link to View this exposure in the upper right corner of the generated documentation site
- maturity: Indicates the level of confidence or stability in the exposure. One of
high
,medium
, orlow
. For example, you could usehigh
maturity for a well-established dashboard, widely used and trusted within your organization. Uselow
maturity for a new or experimental analysis.
General properties (optional)
- description
- tags
- meta
- enabled — You can set this property at the exposure level or at the project level in the
dbt_project.yml
file.
Referencing exposures
Once an exposure is defined, you can run commands that reference it:
dbt run -s +exposure:weekly_jaffle_report
dbt test -s +exposure:weekly_jaffle_report
When we generate the dbt Explorer site, you'll see the exposure appear:


Related docs
0