https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
r

Rob Martorano

03/12/2023, 9:50 PM
curious if anyone has experimented with dbt defer with dagster? locally when running the dbt cli we have a wrapper script that runs something like the following:
Copy code
dbt ${run/build/test} --project-dir ... --profiles-dir ... --defer --state target/prod --target local --target-path target/local  --select ...
This essentially materializes all the selected assets, and uses the local version of deps when available, else uses the prod version. It would nice to mimic this with dagster locally, especially when working with models that rely on an upstream dbt asset. In dagster world it seems like we'd need to have
--defer
and
--state
added as options to
dbt_cli_resource
in order to accomplish something similar when running locally? Are there other options? Would adding those be something feasible?
1
dagster bot responded by community 1
🤖 1
a

Adam Bloom

03/12/2023, 10:00 PM
Pretty sure the dbt CLI resource is already capable of passing arbitrary arguments to commands…
r

Rob Martorano

03/12/2023, 10:15 PM
oh wonderful it works, thanks! couldn't find that in the docs but see it in the implementation now
g

geoHeil

03/13/2023, 7:23 AM
I think this would fit great into a branching IO manager for DBT
6 Views