how can I use the dev or branch target in DBT for ...
# integration-dbt
g
how can I use the dev or branch target in DBT for a dagster cloud deployment?
n
It's not well surfaced in the guides, but when you load assets from DBT, you define a DBT resource, and in this resource, you can pick the DBT target to be used.
Copy code
resources = {
    "dbt": dbt_cli_resource.configured(
        {
            "project_dir": DBT_PROJECT_PATH,
            "profiles_dir": DBT_PROFILES,
            "target": MY_TARGET
        },
    ),
}

defs = Definitions(assets=load_assets_from_modules([assets]), resources=resources)
d
n
I'm suggesting a docs change about that https://github.com/dagster-io/dagster/pull/13361