How do I fail a run when a Snowflake source is stale?
Add a freshness check on the Snowflake source. If the latest data is older than the threshold, Bruin fails the run before building stale downstream models.
Command
bruin runDefined in
YAML + SQL
Works with
Snowflake + Bruin CLI
What you get
Freshness gatesin-pipelineblocking
How it works in code
custom_checks:
- name: fresh
query: SELECT count(*) FROM t WHERE loaded_at < now() - interval '1 day' -- snowflakeRun bruin run and the Snowflake run stops the moment the rule is violated.
Related use cases
Quality checks by warehouse
Catch row-count anomalies on Snowflake
How do I detect a broken load on Snowflake?
Quality checks by warehouseEnforce a data contract on Snowflake
How do I enforce a schema contract on a Snowflake table?
Quality checks by warehouseValidate referential integrity on Snowflake
How do I check foreign keys on Snowflake?
Catch bad data before it ships
Open source. Built-in and custom checks that run on every pipeline run.