internalsGet Pro

Module 02 · Lesson 12 of 12Pro

SQL style, reviews and tests for pipelines

Level
Intermediate
Topic
SQL for data engineering
Reading time
16 min

When you finish this page you can

  1. Rewrite a transform as named CTEs, one step and one stated grain each, so a second engineer can check it.
  2. Review a SQL change for grain, join keys, NULLs, time zones, date filters and reruns.
  3. Write data tests as queries that must return no rows, covering uniqueness, not-null, accepted values and reconciliation.
  4. Run those tests on a small fixture before a change ships, and decide which ones block the publish.
  1. Design: a first analytics pipeline for an online store30 min
  2. Join pitfalls: duplicated and missing rows16 min

Monday’s revenue changed two days later

is an online store in India. Every night its data team copies the day’s orders from the store’s PostgreSQL database into , rebuilds the report tables, and Daniel, who leads finance reporting, reads them at 07:00.

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