https://dagster.io/ logo
#announcements
Title
# announcements
s

Steve Gustafson

10/27/2020, 8:40 PM
Hi all. Had a quick question on coding patterns for expectations. Suppose I have a data verification step within a solid which should be treated as terminal or non-terminal, depending on the configuration of the pipeline (eg., maybe in dev mode, all failed expectations are terminal, whereas in production runs a failed expectation is only recorded). I can obviously write code that either raises a Failure or yields an ExpectationResult based on the mode that pipeline is running in. Just wondering if there is already API for doing that that I'm overlooking?
m

max

10/27/2020, 9:07 PM
there isn't yet an api for this, but very interested to hear what you would like to be able to write
in the status quo i would use config for this
s

Steve Gustafson

10/27/2020, 9:33 PM
I was kind of hoping to be able to write a snippet like:
Copy code
yield ExpectationResult(
   ...,
   is_terminal=some_condition()
)
1
m

max

10/27/2020, 9:41 PM
would you mind opening an issue?
s

Steve Gustafson

10/27/2020, 9:48 PM
Sure, will do. thanks!
🙏 1
c

cat

12/04/2020, 5:47 PM
couldnt find the corresponding issue so i filed https://github.com/dagster-io/dagster/issues/3335. feel free to close if its a dupe. Thanks @Steve Gustafson for reporting this!