Hey there, is there a way to throw an errow when r...
# ask-community
p
Hey there, is there a way to throw an errow when running a scheduled job if an upstream asset has not been materialzed?
🤖 1
s
Hey Pablo, Can you elaborate a little? Do you mean an upstream source asset? Since regular assets should materialize in topological order during the run.
p
Yeah basically we have a set of DBT models. The first set will materialize at some time. And the second set is scheduled a few hours later but depends on the first set. If the first set fails for some reason I want the second set to throw an error instead of attempting to run with missing data.
s
Hmm I think the way to go here is to check for the data or materialization events inside your schedule evaluation function, and then return a
SkipReason
if it does not exist: https://docs.dagster.io/concepts/partitions-schedules-sensors/schedules
p
Ah sweet that makes sense thank you!]\