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

Bastien Kerysaouen

08/18/2023, 6:53 PM
How do you elegantly stop a job in the middle? For example, says that an op doesn't return anything and thus the following op cannot operate. Currently I raise an error when the op result is empty, but this shows as a failed job whereas my thinking is rather that it is a completed job without output. Should I rewrite all the logic so that each op can run with that empty result, or is there a better pattern? Also, I would appreciate to have a marker in the run overview telling me that such job finished without output.
🤖 2
dagster bot responded by community 2
z

Zach

08/18/2023, 7:05 PM
Conditional branching might be useful here
s

sean

08/18/2023, 7:56 PM
Zach is correct, you should type your returns as optional and return None rather than throwing an error if you want the job to register as a success.
b

Bastien Kerysaouen

08/18/2023, 8:03 PM
Yes, that seems like the right approach, thank you!
2 Views