Module 7: Testing and Data Quality Slides
Slide walkthrough for Module 7 of Production Analytics Engineering with dbt: Metrics, Semantic Layers & Lineage: Use tests to catch broken assumptions...
This slide page is the visual review companion for the full course module. Use it to recap the architecture, examples, exercises, production warnings, and takeaways after reading the lesson.
Slide Outline
- Testing and Data Quality - Use tests to catch broken assumptions before users lose trust.
- Learning Objectives - 3 outcomes for this module
- Why This Module Matters - Data tests are executable assumptions. They do not prove data is perfect, but they catch the breakages you know would ma
- The Mental Model - Lesson section from the full module
- Tiny Example - Lesson section from the full module
- Interactive Check - Lesson section from the full module
- Inline Practice Lab - Lesson section from the full module
- Self-Check Quiz - Lesson section from the full module
- Real-World Use Cases - Reliable executive dashboards that do not disagree across teams, AI analytics agents that query governed metrics instead of guessing SQL
- Common Mistakes to Avoid - 3 mistakes covered
- Production Notes - 1 practical notes
- Inline Exercises - 1 inline exercise
- Key Takeaways - 3 points to remember
Learning Objectives
- Use not_null, unique, relationships, and accepted_values tests
- Write testable assumptions in model YAML
- Connect data quality to user trust
Why This Module Matters
Data tests are executable assumptions. They do not prove data is perfect, but they catch the breakages you know would make the model unsafe.
Production Notes
- Every model should have at least one grain-protecting test. For facts, test the event key. For dimensions, test the entity key.
Common Mistakes
- Testing only columns that already look clean
- Adding hundreds of noisy tests nobody investigates
- Treating warnings and failures without a clear policy
Key Takeaways
- Tests turn assumptions into automated checks
- Basic tests catch many expensive dashboard failures
- Quality is an engineering workflow, not a cleanup sprint
Inline Exercises
-
Add the First Tests
Add basic dbt-style tests to fct_orders and dim_customers.
30-45 minutes - Beginner to Intermediate
- Mark customer_id in dim_customers as unique and not_null
- Mark order_id in fct_orders as unique and not_null
- Add accepted_values for order_status
- Add a relationship test from fct_orders.customer_id to dim_customers.customer_id
Inline lab: complete the exercise directly in the course page.