Skip to content

dbt run and dbt test with different number of dbt threads #24171

Closed Answered by nixent
psimm asked this question in Q&A
Discussion options

You must be logged in to vote

dbt build is combination of run, seed and test. You can invoke those commands separately instead of single build and specify number of threads you want, it will overwrite number of threads defined in the dbt profiles.yml. Alternatively you can create separate profiles and pass them to dbt.cli

@dbt_assets(manifest=dbt_project.manifest_path)
def jaffle_shop_dbt_assets(context: AssetExecutionContext, dbt: DbtCliResource):
    yield from dbt.cli(["run", "--threads", "1"], context=context).stream()
    yield from dbt.cli(["test", "--threads", "8"], context=context).stream()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@psimm
Comment options

Answer selected by psimm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
integration: dbt Related to dagster-dbt
2 participants