From d6488da37b89b6bbb96ead139ddec8ed2f5d6aa4 Mon Sep 17 00:00:00 2001 From: Maxime Armstrong <46797220+maximearmstrong@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:31:51 -0500 Subject: [PATCH] [docs] Mention DAGSTER_BUILD_STATEDIR in dbt defer guide (#25993) ## Summary & Motivation Fixes https://github.com/dagster-io/dagster/issues/25724 ## How I Tested These Changes Docs preview --- docs/content/integrations/dbt/reference.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/integrations/dbt/reference.mdx b/docs/content/integrations/dbt/reference.mdx index 7e3aa8fbb25ff..ca1c13065ddde 100644 --- a/docs/content/integrations/dbt/reference.mdx +++ b/docs/content/integrations/dbt/reference.mdx @@ -161,6 +161,12 @@ In your CI/CD workflows for your Dagster and dbt project: ## Leveraging dbt defer with branch deployments + + 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+ here. + + It is possible to leverage [dbt defer](https://docs.getdbt.com/reference/node-selection/defer) by passing a `state_path` to . 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.