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

Brent Shulman

08/24/2023, 11:25 PM
If I have a multi-asset, but am only materializing one of the outputs, can I stop the asset from reading in non-dependency inputs?
j

jamie

08/25/2023, 1:59 PM
if you set
internal_asset_deps
like this example, along with the
is_required=False
necessary to only materialize one asset, i think that should work for you https://docs.dagster.io/concepts/assets/multi-assets#dependencies-inside-multi-assets
o

owen

08/25/2023, 8:32 PM
Specifically re: the issue of being able to dynamically decide not to read in certain inputs that are not required for computation, there's no built-in way to do this. To get something resembling this behavior, it'd get pretty hacky pretty quickly -- you'd need a custom IO manager that could examine the step context (which is a private property of the InputContext) to determine if an input is a required and if not, just short circuit and return None or something. But it'd be a fairly brittle construction
🌈 1
2 Views