https://dagster.io/ logo
#ask-community
Title
# ask-community
z

Zach P

02/22/2023, 4:11 PM
Is there anyway to get information of
internal_asset_deps
in a
multi_asset
? I have a multi-asset that get’s several assets and would like to only load them into memory if they’re required by one of the selected outputs. Right now, I’m resolving this by having the internal_asset_deps be a global in the file I define the asset, and using it during asset run time as well but was wondering if there is a better / cleaner way to do this.
c

claire

02/22/2023, 6:25 PM
A little awkward, but you could do something like this:
Copy code
context.job_def.asset_layer.assets_def_for_node(self.solid_handle).asset_deps
to fetch the defined internal asset deps
z

Zach P

02/22/2023, 10:13 PM
Ahh thanks, I appreciate it! I had looked a lot into the op_def, solid, etc. but not job_def.
🌈 1
3 Views