internalsGet Pro

Module 15 · Lesson 4 of 12Pro

Testing data with dbt

Level
Intermediate
Topic
Transformations with dbt
Reading time
18 min

When you finish this page you can

  1. Declare dbt’s four built-in data tests in YAML and write singular tests for rules they can’t express.
  2. Predict what dbt build runs, skips and keeps when a test fails, and what that means for the tasks after it in Airflow.
  3. Choose error, warn or a threshold for each test, and keep failing rows with store_failures.
  4. Write a dbt unit test that checks a model’s logic on fixed rows before the model is built.
  1. SQL style, reviews and tests for pipelines16 min
  2. Design: a data model for an online store28 min
  3. Design: orchestrating a daily reporting pipeline28 min
  4. dbt models, sources and references14 min

A test stopped ₹37 lakh at 02:51

is an online store in India that takes about 500,000 orders a day. Its data team loads orders, payments and partner sales into , and builds the KARTLY.ANALYTICS tables from them: fct_order_lines, fct_orders, dim_customer, dim_product and dim_date. Every night ’s kartly_nightly runs dbt_build, then check_finance and publish_finance. Daniel, who leads finance reporting, reads the result at 07:00 IST.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan