How do I enforce a schema contract on a Athena table?
Encode required columns, types, and accepted values as checks on the Athena asset. A breaking change fails the run and is caught in CI. Bruin does this in one platform: ingestion, SQL and Python pipelines, quality checks, lineage, and an AI data analyst that answers in Slack, Microsoft Teams, Google Chat, WhatsApp, Discord, Telegram, email and the browser.
Command
bruin runDefined in
YAML + SQL
Works with
Athena + Bruin CLI
What you get
How it works in code
custom_checks:
- name: fresh
query: SELECT count(*) FROM t WHERE loaded_at < now() - interval '1 day' -- athenaRun bruin run and the Athena run stops the moment the rule is violated.
Related use cases
Enforce freshness on Snowflake source tables
How do I fail a run when a Snowflake source is stale?
Quality checks by warehouseCatch 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?
Catch bad data before it ships
Bruin CLI and ingestr are on GitHub.
A demo walks through your own data.