Skip to content

Commit

Permalink
[docs] Mention DAGSTER_BUILD_STATEDIR in dbt defer guide (#25993)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Fixes #25724

## How I Tested These Changes

Docs preview
  • Loading branch information
maximearmstrong authored Nov 19, 2024
1 parent 8360d97 commit d6488da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/content/integrations/dbt/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ In your CI/CD workflows for your Dagster and dbt project:

## Leveraging dbt defer with branch deployments

<Note>
This feature requires the `DAGSTER_BUILD_STATEDIR` environment variable to be
set in your CI/CD. Learn more about required environment variables in CI/CD
for Dagster+ <a href="/dagster-plus/getting-started">here</a>.
</Note>

It is possible to leverage [dbt defer](https://docs.getdbt.com/reference/node-selection/defer) by passing a `state_path` to <PyObject object="DbtProject" module="dagster_dbt" />. This is useful for testing recent changes made in development against the state of the dbt project in production. Using `dbt defer`, you can run a subset of models or tests, those that have been changed between development and production, without having to build their upstream parents first.

In practice, this is most useful when combined with branch deployments in Dagster+, to test changes made in your branches. This can be done by updating your CI/CD files and your Dagster code.
Expand Down

1 comment on commit d6488da

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-4zemr93el-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit d6488da.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.