The short answer
Data quality tests check whether tables meet expectations before people trust them.
Common categories
- Completeness: not null on required fields; row count > 0
- Uniqueness: / grain key unique
- Validity: values in allowed sets; ranges make sense
- Consistency: relationships between tables (FK-like)
- Accuracy: reconciliations vs source totals (harder, high value)
-- uniqueness idea
select order_id, count(*)
from fct_orders
group by 1
having count(*) > 1;Tools: dbt tests, Great Expectations, custom SQL monitors.
Interview tip: Give 3-4 categories with one concrete check each. Mention blocking vs warning severities for production.