dct exposures¶
Write one dbt exposure per board, so boards appear in dbt's DAG.
Every board that calls ref() or source() becomes a dashboard exposure whose depends_on lists those calls. After dbt parse, dbt ls -s fct_orders+ lists the boards reading fct_orders, and dbt docs and Catalog show them in lineage. dbt parse fails if a board references a model that does not exist.
Boards with no ref()/source() are skipped and listed. A board that does not compile, a dbt call dct cannot read (package-qualified or versioned ref()), or two boards mapping to the same exposure name is an error, and nothing is written.
Exposure names come from the board path: charts/finance/sales.yml becomes finance__sales. meta.dbt_charts.board holds the board path.
Configuration¶
dbt_charts.yml:
exposures: owner: name: Analytics email: analytics@example.com path: models/dbt_charts/exposures.yml
| Key | Description |
|---|---|
owner |
Required. name, email, or both. dbt requires an owner on every exposure. |
path |
Output file relative to the dbt project root. Default models/dbt_charts/exposures.yml. Must sit under one of dbt_project.yml's model-paths. |
Commit the file: dbt platform jobs run dbt, not dct, so a generated-only file never reaches them.
Options¶
| Option | Description |
|---|---|
--check |
Write nothing; exit 1 if the file is stale |
--json |
Typed output for agents and scripts |
--project-dir PATH |
Project root (default: walk up from the current directory) |
--dbt-project-dir PATH |
dbt project root, when it is not the dbt Charts project root |
Validate the boards a model change affects¶
dbt --quiet ls -s state:modified+ --resource-type exposure --state prod-artifacts \
--output json --output-keys meta \
| jq -r '.meta.dbt_charts.board' \
| xargs dct validate
Run it from the project root, with prod-artifacts/ holding the production manifest.json.
Examples¶
Related¶
dct impact: which boards read a column- CI guide