Skip to main content

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

Declaring an exposure

Exposures are defined in .yml files nested under an exposures: key.

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 or email required; additional properties allowed

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, or low. For example, you could use high maturity for a well-established dashboard, widely used and trusted within your organization. Use low maturity for a new or experimental analysis.

General properties (optional)

  • description
  • tags
  • meta

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 our documentation site, you'll see the exposure appear:

Dedicated page in dbt-docs for each exposureDedicated page in dbt-docs for each exposure
Exposures appear as orange-y nodes in the DAGExposures appear as orange-y nodes in the DAG
0