-
Notifications
You must be signed in to change notification settings - Fork 9
Description
When using Dagster with containerised code locations, if the asset dependencies are created with AssetDep, Dagster will create an asset definition even if it's for an external asset, leading to the following error in the UI:
Multiple asset definitions found
This asset was loaded from dlthub, but duplicate definitions were found in 1 other repo. You should rename these assets to avoid collisions.
Would it be possible to refactor the code so instead of using dagster_sqlmesh.types.ConvertibleToAssetDep we use dagster's CoercibleToAssetDep?
CoercibleToAssetDep = Union[
CoercibleToAssetKey, "AssetSpec", "AssetsDefinition", "SourceAsset", "AssetDep"
]
Then the translator can be adapted accordingly by the end user, and instead of the return type for the SQLMeshDagsterTranslator.create_asset_dep being ConvertibleToAssetDep, it should be dagster's CoercibleToAssetDep.