https://dagster.io/ logo
Title
k

Kevin Haynes

02/07/2022, 11:03 PM
I don't want to muddy up the discussion in that ☝️ post, so I'll ask a tangential question here instead 🙂 Looking at this WIP example shared in that thread, why would one want to use the
out
parameter for the op config instead of just a return value for the function? Is it because it has multiple return values and one is not always guaranteed? Are there other reasons one might use that pattern?
y

yuhan

02/07/2022, 11:07 PM
Hi @Kevin Haynes thanks for starting another thread! This is for conditional branching where you can set an out to be optional. When the optional out is not emitted, all of its downstream ops would be skipped.
k

Kevin Haynes

02/07/2022, 11:08 PM
Fascinating! That makes total sense. I'm going to figure out a way to use this in my jobs
❤️ 1
y

yuhan

02/07/2022, 11:08 PM
More specially, I was referring to
"nyc_articles": Out(is_required=False)}
for specifying the “nyc_articles” could be optional.
👍 1
Yea, please don’t hesitate to comment in here or ping me with any other questions!