Data Quality/Quality checks by warehouseData Engineer

How do I check foreign keys on Postgres?

Use a custom check that returns orphaned keys on Postgres. If any exist the run fails, so joins downstream stay correct.

Command

bruin run

Defined in

YAML + SQL

Works with

Postgres + Bruin CLI

What you get

Referential integrityin-pipelineblocking

How it works in code

custom_checks:
  - name: fresh
    query: SELECT count(*) FROM t WHERE loaded_at < now() - interval '1 day'  -- postgres

Run bruin run and the Postgres run stops 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.