DT10: Capstone: three data projects for SabziSathi

Lesson 1 of 5 ยท reading 15โ€“25 minutes; practice and project time is on the module page

Planning the capstone

๐ŸŽฏYou'll be able to

Plan the capstone: scope, order of work, evidence and time.

๐Ÿ The everyday picture

A water supply engineer fixes the filters at the treatment plant first, then the pipes, then the taps. Polishing the taps while dirty water flows through them means doing it twice.

๐Ÿ“˜What it really is

Area What "good" looks like
Cleaning Every format read on purpose, money in paise, nothing guessed (DT1)
Quality Measurable rules, quarantine with reasons, counts that add up, tests with independent numbers (DT2)
Pipeline Idempotent, backfillable, scheduled safely, loud on failure (DT3)
Scale judgement A reasoned view on streaming, Spark and file formats (DT4)
Warehouse Layers, cost awareness, least privilege and personal data minimised (DT5)
Model Declared grain, star schema, correct measures, type 2 history, salted keys (DT6)
Tested code dbt tests, docs, incremental models and freshness (DT7)
Analysis Readable SQL, window functions, cohorts and funnels without traps (DT8)
Dashboard Decisions first, defined metrics, honest charts, privacy and freshness (DT9)

๐Ÿ“A worked example

A learner's capstone plan (illustrative):

Week Work Done when
1 Project 1: raw notes, profile, cleaning functions and unit tests Pipeline tests 3, 4 and 8 pass
2 Project 1: quarantine, load log, idempotent loads, missing file, schedule All 10 pipeline tests pass twice in a row
3 Project 2: staging without personal data, salted keys, area history Warehouse tests 1 to 6 pass
4 Project 2: net revenue, sources and freshness, incremental fact, docs All 10 warehouse tests pass
5 Project 3: brief, marts-only build, definitions, honest bars, suppression All 8 dashboard tests pass
6 Capstone checks, demo, self-review, design notes and case studies pytest tests shows 28 passed; every project page saved as self-checked complete

Doing Project 1 first meant the warehouse's revenue matched the expected โ‚น19,65,764 as soon as the model was right, instead of chasing a number that was wrong for reasons upstream.

๐ŸŒWhere it's used

๐Ÿ“Case scenario

A learner starts with the dashboard because it's the part people see. They get its layout right, but the headline revenue is wrong, and they spend two days adjusting the dashboard's SQL. The real cause is upstream: the starter pipeline loses rows with commas in their amounts and keeps cancelled orders. Fixing Project 1 first would have made the dashboard's numbers right without touching its SQL.

๐Ÿ–ฑ๏ธTry it

Download the kit, follow sabzisathi/README.md, and run pytest tests once (about 20 seconds; most tests fail at this stage). Then write your plan with a "done when" check for each week. Success: your plan lists all 28 tests across the three projects.

โš ๏ธCommon mistakes

๐Ÿ› ๏ธFor your project

Run the kit's tests once before you plan, so you know what fails now: on the starter, 2 of the 28 pass: Project 2 test 1 (the starter's dbt project builds, it just builds the wrong things) and test 5 (its date dimension already covers every order date).

โœ…Quick check

Why build Project 1 before Project 2?

Show the answer

The warehouse's numbers depend on the pipeline's cleaning; wrong input makes every later number wrong.

What should you record as you go?

Show the answer

Test output and key numbers for each project, saved as each one passes.

โ† BackDT10
ProLearners Assist