DT3: Building reliable pipelines

Lesson 1 of 5 · reading 15–25 minutes; practice and project time is on the module page

The shape of a pipeline

🎯You'll be able to

Describe the stages of a pipeline, explain the difference between ETL and ELT, and decide where each kind of work belongs.

🏠The everyday picture

A milk cooperative collects milk from villages (extract), tests and chills it at the centre (transform), and sends it to the dairy (load). If the test fails, the can is set aside, not poured in with the rest.

📘What it really is

📝A worked example

Input: run the solution's python -m pipeline.run --all, then cd warehouse and dbt build --profiles-dir . (with SABZI_KEY_SALT set).

Expected output: the loader prints one line per day (for example 2026-10-05: 302 rows loaded, 3 quarantined) and finishes in about 2 seconds; dbt reports PASS=37 WARN=0 ERROR=0. Measured on 1 November 2026 on a 4-core Linux computer.

🌍Where it's used

📝Case scenario

A school chain's report mixed cleaning and calculations in one 900-line script. When the attendance numbers looked wrong, nobody could tell whether the cleaning or the maths was at fault. Splitting it into a loader and separate SQL models made each step checkable, and the fault (a join counting siblings twice) was found in an afternoon.

🖱️Try it

Draw SabziSathi's pipeline as boxes and arrows from raw/ to the dashboard, naming each layer and the tool that writes it. Success: every arrow goes one way, and you can say which step quarantines rows.

⚠️Common mistakes

🛠️For your project

Project 1 builds the loader stage; Project 2 builds the dbt layers; Project 3's dashboard reads only the marts.

✅Quick check

What's the difference between ETL and ELT?

Show the answer

ETL transforms before loading; ELT loads first and transforms inside the warehouse.

Why keep layers?

Show the answer

Each step stays simple and problems can be traced back one layer at a time.

← BackDT3
ProLearners Assist