Arman Pouyaei Start a conversation
Lesson 30  ·  Nov 12, 2026
Data Engineering Fundamentals

Anatomy of a pipeline: ELT, stage by stage

Every lesson so far taught one tool at a time. A pipeline is what you get when the tools run in a fixed order, unattended, every day: data leaves a source, lands raw, gets cleaned and enriched, and ends up somewhere people can query it. This module builds one real pipeline — weather-station observations for the Northeast — one stage per lesson, using only tools you already know.

The code

# The whole module in one picture: four stages, run in order, every day
def run_pipeline(day):
    files  = ingest(day)       # 1. EXTRACT: pull raw observations (API/files)
    bronze = land_raw(files)   # 2. LOAD: save untouched, partitioned by day
    silver = clean(bronze)     # 3. TRANSFORM: types, CRS, quality checks
    gold   = enrich(silver)    # 4. SERVE: joined, aggregated, query-ready
    return gold

In practice

ETL vs ELT is just the order of steps 2 and 3. Classic ETL transforms data on a staging server, then loads the finished product. Modern lake pipelines do ELT: load the raw data first, transform it inside the lake. Storage is cheap and compute is elastic, so raw-first wins — and raw is reprocessable, which a transformed-only copy is not.

Stages are persisted, not passed in memory. Each stage writes its output to the lake before the next one starts. If the transform breaks on Tuesday, the raw data is still sitting there untouched; fix the code, rerun one stage, and no source ever gets re-asked. That restart-from-any-stage property is what separates a pipeline from a script.

Batch vs streaming changes the clock, not the shape. This module runs a daily batch (one day per run). A streaming version would run the same four stages on small windows of minutes — same contracts, faster heartbeat.

Python bridge: You have already written every stage as one-off code: reading data in Lesson 21, transforming in Lessons 19–20, writing partitioned files in Lesson 15. A pipeline is those scripts plus order, persistence, and a schedule.

Further reading

How to build an ETL data pipeline in 6 steps — Fivetran (Fivetran's six-step build guide — the steps map onto our four stages, and its ETL-vs-ELT section is the clearest short version)

Try it

Practice question: Your manager asks for hourly temperature maps built from station readings. Sketch the four stages for that pipeline in one line each: what does each stage take in, and what does it hand to the next stage?

Show answer

Result: One good sketch: Extract — pull the hour's observations from the stations API as JSON. Load — save the JSON untouched to raw/stations/date=…/hour=… (bronze). Transform — parse to a table, set CRS to EPSG:4326, drop bad coordinates, convert units (silver). Serve — aggregate readings to counties and write GeoParquet (gold); the maps read gold only. If each of your four lines names an input and an output, you have a pipeline design — the rest of this module fills in each line with real code.

← All posts