Bird
0
0

You want to combine snapshot historical tracking with data quality checks in dbt. Which approach best integrates these?

hard🚀 Application Q9 of 15
dbt - Advanced Patterns
You want to combine snapshot historical tracking with data quality checks in dbt. Which approach best integrates these?
AAdd data quality checks inside snapshot SQL select statement
BRun data quality tests only on source tables, not snapshots
CUse 'check' strategy with quality columns in check_cols
DCreate snapshots for history and separate tests for quality on snapshot tables
Step-by-Step Solution
Solution:
  1. Step 1: Separate concerns of history and quality

    Snapshots track history; data quality tests are separate dbt features run on tables.
  2. Step 2: Best practice for integration

    Creating snapshots for history and running tests on those snapshot tables keeps logic clear and maintainable.
  3. Step 3: Evaluate other options

    Embedding quality checks in snapshot SQL complicates snapshots. Using check_cols for quality is misuse. Ignoring snapshot tests misses quality on historical data.
  4. Final Answer:

    Create snapshots for history and separate tests for quality on snapshot tables -> Option D
  5. Quick Check:

    Separate snapshots and tests for history and quality [OK]
Quick Trick: Run tests separately on snapshot tables for quality checks [OK]
Common Mistakes:
MISTAKES
  • Mixing quality logic inside snapshot SQL
  • Misusing check_cols for quality checks
  • Not testing snapshot tables at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes