Is there any way to skip a model from running if i...
# community-support
a
Is there any way to skip a model from running if its parent nodes freshness tests fail?
@Noya Offer?
n
Hey! If you're using Elementary freshness tests, and you set the severity to
error
, then yes — when you run
dbt build
, dbt will skip building downstream models that depend on the source whose freshness test failed. This works because Elementary freshness tests are compiled as regular dbt test nodes. So when a test with
severity: error
fails, it causes the upstream node to fail, and
dbt build
will not proceed with downstream dependencies — which sounds like exactly what you're aiming for.