Skip to main content

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

  1. Testing and Data Quality - Use tests to catch broken assumptions before users lose trust.
  2. Learning Objectives - 3 outcomes for this module
  3. 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
  4. The Mental Model - Lesson section from the full module
  5. Tiny Example - Lesson section from the full module
  6. Interactive Check - Lesson section from the full module
  7. Inline Practice Lab - Lesson section from the full module
  8. Self-Check Quiz - Lesson section from the full module
  9. Real-World Use Cases - Reliable executive dashboards that do not disagree across teams, AI analytics agents that query governed metrics instead of guessing SQL
  10. Common Mistakes to Avoid - 3 mistakes covered
  11. Production Notes - 1 practical notes
  12. Inline Exercises - 1 inline exercise
  13. 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

  1. 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.

Read the full module | Back to course curriculum