Every data or ML system, from a cron job to a big platform, is the same chain of stages. Learn the chain, and every tool has a place.
What can go wrong
The forecast that doubled
A bike-sharing app predicts how many bikes each dock will need tomorrow. One Monday the forecast for the dock by the stadium doubled, and vans moved 40 extra bikes there for nothing. The model was fine. A weekend app update had started logging every rental twice, the nightly job loaded both copies, and the model learned that stadium rentals had doubled. It took three days to find, because nobody could draw the system.
Follow one rental from the tap in the app to tomorrow’s forecast. Then switch on the **double-logging bug** and watch where the bad rows go, with and without a **validation** step.
The mental modelA data/ML system is a chain of stages, and each turns one thing into the next: events into rows, rows into tables, tables into features, features into a model, a model into predictions. A mistake in one stage travels downstream until some stage checks for it.
The idea, with no tool attached
🔗Stages, not scriptsHowever it’s built, every system has the same stages: get data in, keep it, check it, shape it, train, ship, serve, watch. A single script can hold several stages; a platform gives each its own tools.
📦Every arrow carries somethingRows, files, tables, a model file, a container image, predictions. Knowing what travels on each arrow, and its shape, is most of debugging.
🗓️Something runs itAn orchestrator (or a humble cron line) decides when each stage runs, what waits for what, and what happens when a stage fails.
🔁It’s a loopPredictions change what users do, which creates new data. Monitoring watches the loop and decides when the model needs retraining.
Choosing
The first tool decision is how much system you need at all.
A notebook
one person, one question
A one-off question that nobody will ask again.
Exploring data before anything is decided.
Anyone needs the answer again tomorrow.
Others depend on the numbers.
No setup and no safety: nothing reruns it, checks it or tells you it broke.
A scheduled script
cron + one Python file + a database
One daily job, one team, data that fits on one machine.
Jobs that depend on other jobs.
Failures must retry, alert or be backfilled.
An afternoon to set up; you will be the alerting system.
An orchestrated pipeline
Airflow or Dagster + a warehouse + data checks
Many jobs with dependencies.
Several people rely on the data every day.
A single small job.
Days to set up, and something to keep running.
A full ML platform
tracking, registry, CI/CD, monitoring
Several models in production, retrained regularly.
Money or safety depends on them.
Your first model, before anyone knows it’s useful.
Weeks of work, and people to run it.
The deciding questionWho is hurt if this stops working tomorrow, and how would you find out?
You might not need any of these.For a one-off question, a notebook is the right answer. Build the system when someone starts depending on the answer.
A whole pipeline in one small script
Tap a highlighted line or a note to see what it does.
daily_rentals.py✓ Ran with Python 3.12 · pandas 2.2.3 on 2026-10-24
Output
duplicate rows: 1
dock day rentals
park 2026-10-19 1
stadium 2026-10-19 3
line 3In production this is a query on the app’s database or an API call. The stage is the same.
line 5Rental 102 appears twice: the double-logging bug from the story, in miniature.
line 11The check runs on the raw rows, while each rental still has its own id.
line 13Drop the copies before anything is counted.
line 16From here on, rentals are counts: a duplicate would hide inside a number.
line 19A real pipeline writes the table to storage; the next stage reads it from there.
Two questions about it
Five quick questions
Answer everything, then submit
7 of 8 correct passes the lesson, lights its part of your System Map and unlocks the next one.