Data Quality/Custom checks and gatesAnalytics Engineer

How do I write a custom check with my own SQL?

Define a custom check with a SQL query that should return zero rows. If it returns anything, the run fails, so you can encode any business rule as a check.

Command

bruin run

Defined in

YAML + SQL

Works with

Bruin CLI + your warehouse

What you get

Custom SQL checksblocking gatesCI-friendly

How it works in code

custom_checks:
  - name: no_future_dates
    query: SELECT count(*) FROM orders WHERE created_at > now()

Run bruin run and the run fails the moment the rule is violated.

Catch bad data before it ships

Open source. Built-in and custom checks that run on every pipeline run.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.