dbt tests that actually catch bad data
Most dbt test suites I've inherited check not_null and unique and not much else. Those catch schema problems, not business problems. The tests that have saved us: accepted_values for status columns (catch typo'd statuses) A relationships test on every foreign key A custom test for "row count per day should be within 30% of last week" Freshness checks on source tables The custom tests took an…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.