Skip to content
Discussion options

You must be logged in to vote

load_assets_from_dbt_project was the API for loading your dbt project as software-defined assets in dagster-dbt<0.20.0. It was kept around for backwards compatability.

In dagster-dbt>=0.20.0, the @dbt_assets decorator and DbtCliResource was released. These two APIs give more flexibility when interacting with dbt and Dagster. One example of this flexibility is that you can modify the compute function of your @dbt_assets decorated function.

Explicitly:

@dbt_assets(manifest=dbt_manifest_path)
def jaffle_dbt_assets(context: AssetExecutionContext, dbt: DbtCliResource):
    print("I can run custom code before my dbt invocation")
    
    yield from dbt.cli(["build"], context=context).stream()
 …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rexledesma
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