dbt exposures are a way to explicitly register the consumers of your data — dashboards, applications, ML jobs — inside your dbt project.
Exposures are metadata rather than executable nodes, but they are powerful entry points for lineage diagrams, the docs site, and selector-driven rebuilds. This article walks through implementation patterns and the points most likely to show up on the exam.
Exposures are a resource type that declares external assets which consume dbt models or sources — BI dashboards, business apps, batch and streaming ML — in YAML so they participate in the lineage graph. Once declared, the dbt docs lineage view connects upstream and downstream nodes, and selectors can trigger rebuilds of the upstream side.
Three big payoffs: blast-radius visibility (which dashboards could break), change-driven rebuilds (use +exposure selectors to rerun only what's needed), and clear ownership (centralize contacts via the owner field).
type captures the nature of the downstream asset — commonly dashboard, analysis, application, or ml. Regardless of type, you list ref/source under depends_on and specify owner (name/email) and maturity (low/medium/high, etc.). url and description are too useful operationally to omit.
Exposures act as sinks in the lineage graph, with blast radius bounded by the upstream nodes listed in depends_on. When you add or replace models, verify that every derived mart a dashboard reads from is enumerated.
Lineage from models to downstream assets (exposures)
Implementation is simple: add an exposures section to any schema.yml in your project. depends_on can mix ref and source. The example below ties a Looker dashboard to an executive KPI mart, the customer dimension, and a raw events source.
Use the comparison table to see how exposures divide responsibilities with models and sources.
| Resource | Purpose | Defined In | Executed? |
|---|---|---|---|
| Exposure | Declares downstream assets and connects them to lineage | exposures in schema.yml | Not executed (metadata) |
| Model | Defines transformation logic | SQL under models/ plus schema.yml | Executed |
| Source | Declares raw data and quality checks | sources in schema.yml | Not executed (reference definition) |
Example exposures YAML definition
version: 2
exposures:
- name: weekly_kpi_dashboard
type: dashboard
maturity: high
url: https://bi.example.com/dashboards/123
description: Executive KPI dashboard (weekly refresh)
owner:
name: BI Team
email: [email protected]
depends_on:
- ref('mart_kpi_summary')
- ref('dim_customer')
- source('app', 'events_raw')
tags: ['bi', 'executive']
meta:
tool: looker
schedule_cron: '0 7 * * 1'owner.email matters as the first contact during incidents. maturity helps prioritize change risk. url should always link to the actual dashboard or app. Keep the description short but include refresh frequency, SLO, and the definition of key metrics — that way the docs site alone is enough to make a call.
tags and meta drive governance. Label domain and criticality via tags. Put external tool identifiers (e.g., tool=looker, tableau, superset), operational schedules, and owning-team codes into meta so they're queryable — this makes inventories and impact analysis far easier.
Exposures really shine when combined with selectors. +exposure:name picks the upstream of an exposure, enabling minimal rebuilds. This is useful for dashboard health checks and for regression testing scoped to a specific application's impact.
For diff-driven rebuilds, combine with state:modified so you only build the upstream of maturity=high exposures impacted by changed models — a sensible guardrail. In schedulers and CI, defining one job per business-critical exposure keeps operations predictable.
CI example: health-check job for a critical exposure
dbt build --select +exposure:weekly_kpi_dashboard --warn-error --fail-fastExposures are not executed. They are declared in YAML and surface in lineage and docs. Upstream rebuilds are driven by selectors (+exposure:...). These three points come up often.
depends_on can mix ref and source. owner.email is shown as a contact in the docs. type is a classification (dashboard, etc.) — it categorizes, it does not change behavior. These tend to appear as detail-level questions.
Analytics Engineer
問題 1
You're about to change a mart table that a BI dashboard depends on. You want to rebuild only the affected upstream and catch any dashboard breakage before it ships. Which dbt feature fits best?
正解: A
Exposures tie downstream assets into the lineage graph, and the +exposure: selector rebuilds only the upstream. Docs blocks, packages, and macros don't directly fit this goal.
Are exposures executed? Do they affect run order?
No. Exposures are metadata and are never executed. They do not directly affect run order, but they serve as an anchor for selectors that target upstream models and tests.
Can exposures be auto-generated from BI tools?
dbt itself does not provide auto-generation. In practice, teams record BI tool IDs and URLs in meta/url, and manage the YAML through scripts or internal tooling.
Can depends_on include things other than model names?
Yes. You can mix ref('model') and source('source_name','table'). Enumerate every upstream node a dashboard might touch — marts, dimensions, and critical sources.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
dbt Models: SQL-Defined Transformation Units (2026)
Model fundamentals — SELECT-based definitions, naming, refs,...
dbt Analytics Engineering Exam: Complete Guide (2026)
Pass the AE Certification — scope, weighting, sample questio...
dbt Cloud vs dbt Core: Feature & Cost Comparison (2026)
Honest comparison of dbt Cloud vs. dbt Core — IDE, scheduler...
dbt Project Structure: models/seeds/macros Layout (2026)
Recommended dbt project layout — models, seeds, macros, snap...
dbt_project.yml Explained: Every Config (2026)
Every dbt_project.yml setting that matters — paths, vars, ma...