Dmitry Persiyanov
11/19/2019, 12:40 PMalex
11/19/2019, 4:07 PMDmitry Persiyanov
11/19/2019, 4:22 PMalex
11/19/2019, 4:32 PMHow does dagster decide which donwstream graphs it should skip and which not?So we do not have any system wide mode (yet) like the one you described for Luigi - but you can accomplish this manually by not yielding an optional output.
@solid
def example():
expected_path = calculate()
if exists(expected_path):
return # exit early - downstream work skipped
output = do_work()
write(output, expected_path)
yield Output(...)
Dmitry Persiyanov
11/19/2019, 4:50 PM@pipeline
-s which turn out to execute the same @solid
with the same parameters, then I shouldn't expect that solid's output will be reused for a pipeline that runs last.
So basically that solid will be executed twice despite it does exact same calculations (since input is the same, as well as rest of parameters). Is this correct?
Thanks!alex
11/19/2019, 6:02 PMif I have two differentCorrect - we don’t make global assumptions about idempotentcy so we don’t do this. In the future we will add an “on switch” to enable this type of behavior - but in the meantime you can implement it in user space.-s which turn out to execute the same@pipeline
with the same parameters, then I shouldn’t expect that solid’s output will be reused for a pipeline that runs last@solid
Dmitry Persiyanov
11/19/2019, 8:31 PMIlya Tyutin
05/04/2020, 7:05 AMif os.path.exists(...):
# read the df from disk
else:
# run composite solid to get the df
I can't find a way to implement such logic at the moment. I would love to encapsulate that logic in one solid for convenience 🤔 Any suggestions?