Lilian GARCIA PAILLE
06/15/2023, 12:33 PMNicolas Guary
06/15/2023, 2:01 PMdef create_assets(your_config: dict) -> AssetsDefinition:
# Parse your config to get your previously hard-coded variables
@asset(
group_name=???,
compute_kind="???",
io_manager_key="???",
key_prefix=f"???" #get from config,
)
def your_asset():
return your_asset
owen
06/15/2023, 4:54 PMdef create_assets(your_config: dict) -> AssetsDefinition:
# Parse your config to get your previously hard-coded variables
@asset(
group_name=???,
compute_kind="???",
io_manager_key="???",
name="???", #set the name of the asset
)
def your_asset():
...
return your_asset
Lilian GARCIA PAILLE
06/16/2023, 8:06 AMLilian GARCIA PAILLE
06/16/2023, 9:07 AMLilian GARCIA PAILLE
06/16/2023, 2:06 PMLilian GARCIA PAILLE
06/16/2023, 2:06 PMowen
06/16/2023, 8:16 PMdef create_assets(your_config: dict):
...
assets = create_assets(...)
load_assets_from_package_module
is looking for variables in the module that are a specific type (AssetsDefinition or list of AssetsDefinition), so I believe defining it in this way would allow those assets to be noticed