Binoy Shah
04/13/2023, 2:05 PMworkflows.inventories.assets
and it is managed within its own definitions and materialization flows. But this asset is a re-usable asset and would like to pass in as input to many other downstream assets in different packages/modules.
How do I enable sharing of such assets. if I have inventories
asset in one package, if it were in same code file, the consumer of inventories would just use it by calling
def inventory_consumer(inventories):
pass
but because inventories is in different package, I am currently getting error
Input asset '["inventories"]' for asset '["consolidated_sales"]' is not produced by any of the provided asset ops and is not one of the provided sources
What are my options ?Vinnie
04/13/2023, 2:47 PMBinoy Shah
04/13/2023, 2:59 PMload_assets_from_package_module
something like load_as_source_asset
explicitly defining a SourceAsset
breaks my cohesiveness to the actual asset, leaving it for string manipulation values, that make it more fragile and breakage proneVinnie
04/13/2023, 3:01 PM<http://AssetsDefinition.to|AssetsDefinition.to>_source_asset()
https://docs.dagster.io/_apidocs/assets#dagster.AssetsDefinition.to_source_assetBinoy Shah
04/13/2023, 3:01 PM