Skip to content

Commit

Permalink
DBT code version docs (#11692)
Browse files Browse the repository at this point in the history
### Summary & Motivation

Add some docs for DBT asset code versions.
  • Loading branch information
smackesey committed Jan 18, 2023
1 parent 1c12e96 commit a54d170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/content/integrations/dbt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Dagster orchestrates dbt alongside other technologies, so you can combine dbt wi
Dagster has built-in support for loading dbt models, seeds, and snapshots as software-defined assets, enabling you to:

- Visualize and orchestrate a graph of dbt assets, and execute them with a single dbt invocation
- Version your dbt models by their defining SQL code, allowing downstream assets to be automatically marked stale when a model changes
- View detailed historical metadata and logs for each asset
- Define Python computations that depend directly on tables updated using dbt
- Track data lineage through dbt and your other tools
Expand Down
8 changes: 7 additions & 1 deletion docs/content/integrations/dbt/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dbt_assets = load_assets_from_dbt_manifest(
)
```

**Note:** if you make any changes to your dbt project that change the structure of the project (such as changing the dependencies of a model or adding a new one), you'll need to regenerate your manifest file for those changes to be reflected in Dagster.
If you make any changes to your dbt project that change the structure of the project (such as changing the dependencies of a model or adding a new one), you'll need to regenerate your manifest file for those changes to be reflected in Dagster.

---

Expand Down Expand Up @@ -191,6 +191,12 @@ dbt_assets = load_assets_from_dbt_project(

---

## dbt models, code versions, and staleness

Note that Dagster allows the optional specification of a [`code_version`](/guides/dagster/scheduling-assets#step-5-change-code-versions) for each software-defined asset, which is used to track asset staleness. The `code_version` for an asset arising from a dbt model is defined automatically as the hash of the SQL defining the DBT model. This means that changing the code of the model will automatically cause the corresponding asset, and all downstream assets, to be marked stale.

---

## Defining dependencies

- [Upstream dependencies](#upstream-dependencies)
Expand Down

1 comment on commit a54d170

@vercel
Copy link

@vercel vercel bot commented on a54d170 Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.