https://dagster.io/ logo
Title
g

geoHeil

04/03/2023, 9:29 AM
how can I use the dev or branch target in DBT for a dagster cloud deployment?
n

Nicolas Parot Alvarez

04/03/2023, 1:02 PM
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.
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

daniel

04/03/2023, 1:07 PM
n

Nicolas Parot Alvarez

04/04/2023, 3:55 PM
I'm suggesting a docs change about that https://github.com/dagster-io/dagster/pull/13361