Mike Needham
12/08/2022, 10:24 PMowen
12/08/2022, 10:57 PMuse_build_command=True
when calling load_assets_from_dbt*
then seeds will be loaded alongside modelsMike Needham
12/08/2022, 11:08 PMMike Needham
12/10/2022, 7:30 PMowen
12/12/2022, 5:35 PM@asset(required_resource_keys={'dbt'}, non_argument_deps={AssetKey("some_dep")})
def my_macro_asset(context) -> None:
context.resources.dbt.run_operation("my_macro")
Mike Needham
12/12/2022, 8:45 PMowen
12/12/2022, 8:57 PMdbt
resource that the assets loaded from your dbt project useMike Needham
12/13/2022, 5:37 PMMike Needham
12/21/2022, 1:01 PMcannot import name 'Definitions' from 'dagster' (/home/test/.local/lib/python3.9/site-packages/dagster/__init__.py)
while importing module tutorial_dbt_dagster. Local modules were resolved using the working directory /home/test/dagster/PM3/tutorial_template
. If another working directory should be used, please explicitly specify the appropriate path using the -d
or --working-directory
for CLI based targets or the working_directory
configuration option for workspace targets.owen
12/21/2022, 2:19 PMDefinitions
is a newer API. You can also take a look at an older version of those docs (dropdown in the top left of the docs page) which should reference repository
Mike Needham
12/21/2022, 3:21 PMMike Needham
12/21/2022, 8:57 PMMike Needham
12/21/2022, 8:58 PMowen
12/21/2022, 9:03 PM@asset(required_resource_keys={'dbt'}, non_argument_deps={AssetKey("some_model_name")})
def my_macro_asset(context) -> None:
context.resources.dbt.run_operation("my_macro")
this is pretty similar to what's described here: https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster/part-four, but because you're not actually loading the data from the dbt model into your python function, you don't need to worry about the IOManager stuffMike Needham
12/21/2022, 9:38 PMMike Needham
12/21/2022, 9:52 PMMike Needham
12/21/2022, 9:53 PMowen
12/21/2022, 9:53 PMAssetKey
represent a unique asset. so you'd want non_argument_deps={AssetKey("model1"), AssetKey("model2")}
Mike Needham
12/21/2022, 9:55 PMMike Needham
12/21/2022, 9:56 PM