The Data and AI Guy on YouTube · Open on YouTube
Analytics engineering, data quality and governance · Proficient · Lesson 66 of 99 · 16 min video, then about 3 hours of practice
Testing data: dbt tests, unit tests and source freshness
After this you can add generic, singular and unit tests to dbt models and configure source freshness checks so stale or broken data is caught before stakeholders see it.
Why it matters
Untested models break silently. Add uniqueness and not-null tests on every key, relationships tests between models, accepted-values tests on categories, and freshness checks on sources so you know when an upstream load fails. Write singular tests for business rules ('refunds never exceed the order total'). The trap is hundreds of noisy tests that everyone learns to ignore; test what would cause a wrong decision.
How to use this resource
Data-quality testing and validation in dbt for beginners: built-in tests, custom tests and how to run them.