diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/asset_utils.py b/python_modules/libraries/dagster-dbt/dagster_dbt/asset_utils.py index 68fdaea3e2629..f97b6cdb8f385 100644 --- a/python_modules/libraries/dagster-dbt/dagster_dbt/asset_utils.py +++ b/python_modules/libraries/dagster-dbt/dagster_dbt/asset_utils.py @@ -53,6 +53,7 @@ from dagster._core.definitions.tags import build_kind_tag from dagster._utils.merger import merge_dicts +from dagster_dbt.asset_specs import AssetSpec from dagster_dbt.metadata_set import DbtMetadataSet from dagster_dbt.utils import ( ASSET_RESOURCE_TYPES, @@ -807,12 +808,9 @@ def build_dbt_multi_asset_args( project=project, ) - outs[output_name] = AssetOut( + spec = AssetSpec( key=asset_key, - dagster_type=Nothing, - io_manager_key=io_manager_key, description=dagster_dbt_translator.get_description(dbt_resource_props), - is_required=False, metadata=metadata, owners=dagster_dbt_translator.get_owners( { @@ -832,6 +830,14 @@ def build_dbt_multi_asset_args( dbt_resource_props ), ) + if io_manager_key: + spec = spec.with_io_manager_key(io_manager_key) + + outs[output_name] = AssetOut.from_spec( + spec=spec, + dagster_type=Nothing, + is_required=False, + ) test_unique_ids = [ child_unique_id