dbt exposures

Galaxy Glossary

What are dbt exposures and how do you use them?

dbt exposures are YAML objects that document and track downstream assets—like dashboards, notebooks, or applications—that rely on dbt-produced datasets.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.

Description

What Are dbt exposures?

dbt exposures are YAML declarations that formally link a downstream consumer—dashboard, report, notebook, or application—to the dbt models it queries. They extend dbt’s lineage graph beyond the warehouse, giving teams visibility into who uses each dataset and why.

Why Do Exposures Matter?

Exposures surface the business impact of models, enable proactive impact analysis, and close the loop between data producers and consumers.With them, you can answer “Who breaks if this model changes?” in seconds.

How Do You Declare an Exposure in dbt?

Create an exposures: block in any .yml file inside models/. Supply required keys—name, type, maturity, owner, and depends_on.dbt merges all files at compile time.

What Metadata Should Each Exposure Contain?

Minimum metadata: unique name, human-readable label, type (dashboard, analysis, notebook, application), maturity (low→high), owner (email or Slack handle), and depends_on list of model refs.

How Do Exposures Improve Data Lineage?

dbt docs renders exposures as green nodes connected to upstream models, making it obvious which transformations power each dashboard.Impact analysis, stale asset detection, and governance audits become trivial.

What Are Common Use Cases for Exposures?

Popular scenarios include Looker dashboards, Mode reports, Hex notebooks, ML serving tables, reverse-ETL syncs, and product features that read from the warehouse.

How To Keep Exposures Up to Date?

Automate creation during BI deploys or enforce code-review checklists.Many teams gate dashboard merges on the presence of a matching exposure file.

What Are Best Practices for Exposures?

Use consistent naming, tie exposures to version control, set maturity honestly, and add tags like area:billing for ownership.Review exposures during model deprecation to avoid orphaned dashboards.

How Does Galaxy Help With dbt Exposures?

Galaxy’s AI copilot autocompletes exposure YAML, suggests depends_on based on your SQL, and lets you preview lineage graphs directly in the SQL editor, accelerating adoption without leaving your IDE.

Example dbt Exposure YAML

exposures:
- name: executive_finance_dashboard
label: Executive Finance Dashboard
type: dashboard
maturity: high
url: https://looker.mycorp.com/dashboards/123
owner:
name: Dana Data
email: data@mycorp.com
depends_on:
- ref('fct_revenue')
- ref('dim_date')

Real-World Scenario: Dashboard Refresh Failure

If fct_revenue model fails, dbt Cloud’s Slack alert mentions the dependent exposure.Finance knows the dashboard is stale and engineers can prioritize the fix.

How To Query Exposure Metadata?

dbt stores exposures in the manifest JSON, allowing programmatic access. For instance, run jq '.exposures[] | .name' on manifest.json to list all exposures.

.

Why dbt exposures is important

Exposures connect data production with consumption, revealing business impact. They power smarter impact analysis, governance, and stakeholder communication, ensuring model changes never blindside end users.

dbt exposures Example Usage


jq '.exposures[] | {name, depends_on}' target/manifest.json

dbt exposures Syntax



Common Mistakes

Frequently Asked Questions (FAQs)

Do exposures slow down dbt runs?

No. Exposures are metadata only; they don't impact compilation or execution time.

Can I generate exposures automatically?

Yes. Many teams script Looker API calls to emit YAML or use Galaxy’s AI copilot to draft exposures from SQL context.

How do exposures differ from sources?

Sources describe raw data coming into the warehouse; exposures describe assets leaving it. Together, they bookend the lineage graph.

Does Galaxy visualize exposures?

Galaxy overlays exposure nodes on its lineage graph preview, letting you trace a dashboard back to raw sources without switching tools.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie
BauHealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.