Hello! I would like to ask if there is anyway to c...
# ask-community
a
Hello! I would like to ask if there is anyway to check if an
asset
is materialised during a job run. For example I have asset A,B and C like the image attached, During a run if only B and C are materialised, the asset A
output
will still be passed down to asset C. I would like asset A to return nothing to asset C as it is not materialised during the run. I would like to ask how would I do that?
s
Hi Akira - are you saying that Asset A has
is_required=False
on its output?
a
Hello Sandy! Sorry for the late reply. I'm not quite sure about this parameter, is there a documentation where I can follow how to use the
is_required
parameter?
s
when you say "return nothing to asset C", can you be more specific about exactly what behavior you're looking for?
a
Like for example, for some job runs, I want the output of asset A passed on to C (A&B -> C). But for some job runs, I don't want the output from asset A, passing None to asset C (B -> C). But on dagster, it seems like the output will be passed down as long as the assets are connected.
s
Ah I see - Dagster currently doesn't have that capability. Not the simplest, but you could write a custom IO manager that returns None in the case that an asset isn't part of the run
a
I see! I will have a look into it! Thanks for the help 🙌🙌