Hi everyone, is it possible to list all previous a...
# ask-community
r
Hi everyone, is it possible to list all previous asset keys inside the script and list the, in order to put them in an asset that should run last and place them inside the non_argument_deps? Essentially i want an asset to only run after all other asset in job/run finished.
🤖 1
s
Hi rami, your asset definitions can be constructed by arbitrary python code so I don’t see why this isn’t possible. The details depend on how you are building your assets and what you mean by “previous”.
r
Pulled it of with:
Copy code
globals_dict = globals()
all_assets = {name: value for name, value in globals_dict.items() if isinstance(value, AssetsDefinition)}
asset_keys = list(all_assets.keys())
Thanks.