HomeAll tracks · pricing · account
Python11 apps · Python, SQL & data
Start free Log in

📖 Cheat sheet12 stages36 terms

Every tool on the map, on one page

What each tool is, when to reach for it and what to use instead. A card adds its lesson’s code, the snippet we ran with the real tool, once you’ve passed that lesson. The glossary and the versions are at the end.

Sources · where data is born

App DB

What: The app’s own database (Postgres, MySQL): one row at a time, while a user waits.

Use it when: The app reads and writes its data.

Instead: Copy it out (ingest) for analytics instead of querying it directly.

Lesson 5: OLTP vs OLAP: the app’s database is not for analytics → The code appears here once you’ve passed this lesson.

Events

What: A log of things that happened (a click, a rental, a payment), each with a time.

Use it when: You need what happened and when, not only the latest state.

Instead: Snapshots of tables, when only the current state matters.

Lesson 2: Batch or streaming: how fresh must it be? → The code appears here once you’ve passed this lesson.

Ext. APIs

What: Data that lives in someone else’s system: payments, CRM, ads.

Use it when: The data you need isn’t yours to query directly.

Instead: A vendor’s file export or webhooks, when offered.

Lesson 22: Pulling from REST APIs → The code appears here once you’ve passed this lesson.

Ingest · copy it in

Batch load

What: Copy a pile of data on a schedule: nightly, hourly.

Use it when: People act on the data hours later, not seconds.

Instead: Micro-batches or a stream, when actions can’t wait.

Lesson 3: ETL vs ELT: transform before or after loading → The code appears here once you’ve passed this lesson.

API pull

What: Page through an API, politely: pagination, rate limits, retries.

Use it when: The source only offers an API.

Instead: Webhooks (they push to you), or the vendor’s bulk export.

Lesson 22: Pulling from REST APIs → The code appears here once you’ve passed this lesson.

CDC

What: Change data capture: copy every insert, update and delete from the database’s log.

Use it when: You need every change from a busy app DB, without heavy queries.

Instead: An incremental query on an updated_at column, when it’s reliable.

Lesson 23: Incremental loads: watermarks and CDC → The code appears here once you’ve passed this lesson.

FastAPI

What: A Python framework for building HTTP APIs, with typed request bodies.

Use it when: Other systems should send data to you.

Instead: A queue, when senders shouldn’t wait for you.

Lesson 24: Building an API with FastAPI → The code appears here once you’ve passed this lesson.

Pydantic

What: Data models that check and convert incoming fields at the door.

Use it when: Data arrives from outside and must have a known shape.

Instead: A JSON Schema, when the checking happens in another language.

Lesson 25: Validating input with Pydantic → The code appears here once you’ve passed this lesson.

Webhooks

What: The source calls your URL when something happens.

Use it when: The source supports it and you want changes as they happen.

Instead: Polling the API on a schedule.

Lesson 26: Push vs pull: webhooks and queues → The code appears here once you’ve passed this lesson.

Kafka

What: A durable, partitioned log of events that many consumers read at their own pace.

Use it when: Many events per second, several consumers, replay needed.

Instead: A simple queue (SQS, Redis) or a batch load.

Lesson 27: Streaming with Kafka → The code appears here once you’ve passed this lesson.

Store · keep it

Parquet

What: A compressed, typed, columnar file format; readers skip what they don’t need.

Use it when: Storing tables for analytics on files.

Instead: A warehouse table, which stores columns for you.

Lesson 9: Parquet: columns, compression and skipping → The code appears here once you’ve passed this lesson.

Arrow

What: A columnar table format in memory, shared by pandas, Polars, DuckDB without copying.

Use it when: Moving tables between tools fast.

Instead: Plain Python objects, for tiny data.

Lesson 10: Arrow: one table format in memory → The code appears here once you’ve passed this lesson.

Partitions

What: Folders by a column (often the date) so a query reads only the folders it needs.

Use it when: Big tables filtered by date or another low-cardinality column.

Instead: Clustering inside a warehouse table.

Lesson 11: Partitioning: folders that let queries skip work → The code appears here once you’ve passed this lesson.

Warehouse

What: A database built for analytics: BigQuery, Snowflake, Redshift, DuckDB on one machine.

Use it when: Many people query shared, structured data with SQL.

Instead: Files in a lake, when the data is huge or not tabular.

Lesson 12: Warehouse, lake, lakehouse → The code appears here once you’ve passed this lesson.

Lakehouse

What: Files (often Parquet) in cheap object storage, with table formats like Delta or Iceberg on top.

Use it when: Huge or mixed data, several engines reading it.

Instead: A warehouse, when SQL on tables is all you need.

Lesson 12: Warehouse, lake, lakehouse → The code appears here once you’ve passed this lesson.

Schemas

What: The columns, their types and what they mean, and how they change over time.

Use it when: Always: someone downstream depends on the shape.

Instead: Nothing: “schemaless” only moves the schema into every reader.

Lesson 13: Schemas and schema evolution → The code appears here once you’ve passed this lesson.

Validate · check it

Checks

What: Rules on the data itself: types, ranges, nulls, uniqueness (pandera, Great Expectations).

Use it when: Bad data would otherwise flow silently downstream.

Instead: Checks inside transformations (dbt tests), for outputs.

Lesson 37: Validation checks → The code appears here once you’ve passed this lesson.

Contracts

What: An agreement between the team that produces data and the teams that use it.

Use it when: Another team’s change can break your pipeline.

Instead: Talking, then finding out in production.

Lesson 38: Data contracts between teams → The code appears here once you’ve passed this lesson.

pytest

What: Tests for the pipeline code: small inputs, known outputs.

Use it when: The transformation logic is more than a few lines.

Instead: Data checks, which test the data, not the code.

Lesson 39: Testing pipeline code with pytest → The code appears here once you’ve passed this lesson.

Lineage

What: Which tables feed which: what breaks if this one is late or wrong.

Use it when: More than a handful of tables and jobs.

Instead: A diagram in someone’s head.

Lesson 41: Freshness, lineage and observability → The code appears here once you’ve passed this lesson.

Transform · shape it

pandas

What: DataFrames in memory on one machine.

Use it when: Data fits comfortably in RAM.

Instead: Polars or DuckDB when it’s slow; Spark when it doesn’t fit.

Lesson 14: When pandas is enough → The code appears here once you’ve passed this lesson.

Query plans

What: Describe the whole computation first, then let an optimiser run it.

Use it when: Big data where skipping work matters.

Instead: Eager code, for small interactive work.

Lesson 15: Eager vs lazy: query plans → The code appears here once you’ve passed this lesson.

Polars

What: A fast DataFrame library with lazy plans and all your CPU cores.

Use it when: pandas is too slow and you like DataFrame code.

Instead: DuckDB, if you prefer SQL.

Lesson 16: Polars: expressions and lazy frames → The code appears here once you’ve passed this lesson.

DuckDB

What: An embedded analytics database: SQL on Parquet and CSV files, in-process.

Use it when: SQL on files on one machine, up to hundreds of GB.

Instead: A warehouse, for many concurrent users.

Lesson 17: DuckDB: SQL straight on files → The code appears here once you’ve passed this lesson.

dbt

What: SQL transformations as versioned models with tests and a lineage graph.

Use it when: Many SQL transformations in a warehouse, owned by a team.

Instead: Plain SQL scripts, for a handful of queries.

Lesson 18: SQL transformations with dbt → The code appears here once you’ve passed this lesson.

Spark

What: A distributed engine: one job split across many machines.

Use it when: The data truly doesn’t fit on one big machine.

Instead: DuckDB or Polars on one big machine, first.

Lesson 20: Spark in one lesson → The code appears here once you’ve passed this lesson.

Train · fit a model

scikit-learn

What: Classic machine learning in Python (taught in the Machine Learning app).

Use it when: Tabular data and classic models.

Instead: PyTorch for deep learning.

PyTorch

What: Deep learning in Python (taught in the Deep Learning app).

Use it when: Images, text, sequences, or very large models.

Instead: scikit-learn for tabular data.

Features

What: The same feature code for training and serving, sometimes in a feature store.

Use it when: Features are reused or computed live at serving time.

Instead: Computing features inside one training script.

Lesson 54: Features and training/serving skew → The code appears here once you’ve passed this lesson.

Track · record every run

MLflow

What: Logs every training run’s parameters, metrics and files.

Use it when: More than a few experiments, or more than one person.

Instead: A spreadsheet, until you lose a run.

Lesson 50: MLflow tracking: params, metrics, artifacts → The code appears here once you’ve passed this lesson.

Run compare

What: Compare runs on the same data and split, with the noise in view.

Use it when: Choosing which model ships.

Instead: Picking the best number you happened to see.

Lesson 51: Comparing runs honestly → The code appears here once you’ve passed this lesson.

Registry

What: Named, versioned models with aliases like “champion”.

Use it when: Several model versions, and deployments that must know which.

Instead: A folder of files called model_final_v2.

Lesson 53: The model registry → The code appears here once you’ve passed this lesson.

Data versions

What: Pin which data trained which model (DVC, or hashes in object storage).

Use it when: You must rebuild or explain an old model.

Instead: Hoping the data didn’t change.

Lesson 48: Versioning data and models → The code appears here once you’ve passed this lesson.

Package · freeze it to ship

Lock files

What: Exact versions of every dependency, so the environment can be rebuilt.

Use it when: Always, for anything that runs again.

Instead: An unpinned requirements.txt that changes under you.

Lesson 42: Works on my machine: pinned environments → The code appears here once you’ve passed this lesson.

Config · secrets

What: Settings and passwords from the environment, never in the code or image.

Use it when: Always.

Instead: Nothing: a committed key is a leaked key.

Lesson 43: Configuration and secrets → The code appears here once you’ve passed this lesson.

Docker

What: An image: the code, its dependencies and the OS bits, frozen and runnable anywhere.

Use it when: The code must run the same on another machine.

Instead: A virtualenv, when it only ever runs on yours.

Lesson 44: Docker: images and containers → The code appears here once you’ve passed this lesson.

Compose

What: Several containers that run together: an app and its database.

Use it when: Local development and small deployments.

Instead: Kubernetes, at scale.

Lesson 47: Docker Compose: an app and its database → The code appears here once you’ve passed this lesson.

joblib · ONNX

What: The trained model saved to a file that another process can load.

Use it when: Training and serving are separate programs.

Instead: Retraining at startup (slow, and not the same model).

Lesson 52: Packaging a model → The code appears here once you’ve passed this lesson.

Deploy · ship it safely

Git · PRs

What: Every change reviewed and recorded.

Use it when: Always.

Instead: Copying notebooks around.

Lesson 58: Git for ML code → The code appears here once you’ve passed this lesson.

CI

What: Tests and checks run automatically on every push (GitHub Actions).

Use it when: More than one person, or anything that ships.

Instead: Running the tests by hand, sometimes.

Lesson 59: CI with GitHub Actions → The code appears here once you’ve passed this lesson.

CD

What: Build, push and deploy automatically once the checks pass.

Use it when: You ship often and want it boring.

Instead: A runbook of manual steps.

Lesson 60: CD: build, push, deploy → The code appears here once you’ve passed this lesson.

Canary

What: Send a little traffic to the new version first; roll back on trouble.

Use it when: A bad release would hurt users or revenue.

Instead: All at once, with a fast rollback.

Lesson 61: Safe rollouts: shadow, canary, blue-green → The code appears here once you’ve passed this lesson.

Kubernetes

What: A cluster that runs and scales containers for you.

Use it when: Many services and a team to run the cluster.

Instead: One VM or a serverless platform.

Lesson 62: Where it runs: VM, serverless, Kubernetes → The code appears here once you’ve passed this lesson.

Serve · answer requests

Batch scoring

What: Score everything on a schedule and store the predictions.

Use it when: Predictions can be ready before anyone asks.

Instead: An online API, when inputs only exist at request time.

Lesson 57: A batch scoring job → The code appears here once you’ve passed this lesson.

Model API

What: A web service that returns a prediction per request.

Use it when: The input only exists when the user acts.

Instead: Batch scoring, when it can be precomputed.

Lesson 56: Serving a model with FastAPI → The code appears here once you’ve passed this lesson.

Monitor · watch system, data and model

Logs · metrics

What: Records and numbers that say what the system did and how fast.

Use it when: Always.

Instead: Finding out from users.

Lesson 64: Logs, metrics and traces → The code appears here once you’ve passed this lesson.

Data drift

What: Today’s inputs compared with the training data (PSI, KS).

Use it when: Inputs can change: seasons, new users, a broken source.

Instead: Waiting for accuracy to drop, if labels come late.

Lesson 65: Data drift → The code appears here once you’ve passed this lesson.

Concept drift

What: The link between inputs and outcome changes, so the same input means something new.

Use it when: Behaviour changes over time (fraud, prices, tastes).

Instead: Retraining on a schedule and hoping.

Lesson 66: Concept drift and delayed labels → The code appears here once you’ve passed this lesson.

Alerts · SLOs

What: Alert on what users feel, with thresholds people trust.

Use it when: Someone must act when it breaks.

Instead: Alerting on everything (and reading nothing).

Lesson 67: Alerts people trust → The code appears here once you’ve passed this lesson.

Postmortems

What: Roll back first, then write down why it broke and what prevents a repeat.

Use it when: After every real incident.

Instead: Blame, and the same incident again.

Lesson 69: Incidents, rollbacks and postmortems → The code appears here once you’ve passed this lesson.

Cost

What: What the system costs to run, per job and per prediction.

Use it when: Always, before the bill surprises you.

Instead: Discovering it at the end of the month.

Lesson 70: What it costs → The code appears here once you’ve passed this lesson.

Orchestrate · schedule · retry · backfill

cron

What: A schedule for single commands: “run this at 2 a.m.”.

Use it when: One job with no dependencies.

Instead: An orchestrator, once jobs depend on each other.

Lesson 29: Why cron isn’t enough → The code appears here once you’ve passed this lesson.

DAGs

What: Tasks and the order they must run in, with no cycles.

Use it when: Jobs that depend on other jobs.

Instead: One long script that does everything.

Lesson 30: DAGs: tasks and dependencies → The code appears here once you’ve passed this lesson.

Airflow

What: The most common orchestrator: DAGs in Python, a scheduler, retries, a UI.

Use it when: Many scheduled pipelines with dependencies.

Instead: Prefect or Dagster; cron for one job.

Lesson 31: Airflow: DAG files, operators, the scheduler → The code appears here once you’ve passed this lesson.

Retries

What: Try a failed task again, with a delay; alert if it still fails.

Use it when: Anything that talks to a network or another system.

Instead: Waking someone up for every blip.

Lesson 32: Retries, timeouts and alerts → The code appears here once you’ve passed this lesson.

Backfills

What: Run a pipeline for past dates, one date at a time.

Use it when: A bug fix, a new column, or a new pipeline needing history.

Instead: One giant query over all of history.

Lesson 33: Backfills and the logical date → The code appears here once you’ve passed this lesson.

Idempotent

What: Running a task twice leaves the same result as running it once.

Use it when: Always: retries and backfills depend on it.

Instead: Appending, then deduplicating later (if you remember).

Lesson 34: Idempotent tasks → The code appears here once you’ve passed this lesson.

Prefect · Dagster

What: Newer orchestrators: Python-first flows, or data assets instead of tasks.

Use it when: Starting fresh, or thinking in tables rather than jobs.

Instead: Airflow, the most widely known.

Lesson 35: Airflow vs Prefect vs Dagster → The code appears here once you’ve passed this lesson.

Glossary

Artifact
A file a run or build produces and keeps: a model, an image, a report.
Backfill
Running a pipeline for past logical dates, one interval at a time (lesson 33).
Batch
Processing data in scheduled chunks rather than as each event arrives (lesson 2).
Burn rate
How many times faster than allowed an error budget is being spent (lesson 67).
Canary
Sending a small share of traffic to a new version first, and widening only if its numbers hold (lesson 61).
CDC
Change data capture: copying every insert, update and delete from a database’s log (lesson 23).
Champion / challenger
The model serving now, and a candidate that must beat it on the same data (lessons 53, 68).
Column store
Storage that keeps each column’s values together, so analytics reads only the columns it needs (lesson 7).
Concept drift
The link between inputs and outcome changing, so the same input now means something else (lesson 66).
Consumer group
Kafka consumers sharing a topic’s partitions so each event is processed once by the group (lesson 27).
DAG
Directed acyclic graph: tasks and the order they must run in, with no cycles (lesson 30).
Data contract
A testable promise about a dataset’s schema, rules and owner, checked where it’s produced (lesson 38).
Data drift
Today’s inputs no longer looking like the training data (lesson 65).
ELT / ETL
Load raw data then transform it in the warehouse, or transform it before loading (lesson 3).
Error budget
The failures an SLO allows, e.g. 0.1% of a month’s requests (lesson 67).
Feature store
A system that computes features once and serves them to training and to production alike (lesson 54).
Freshness
How old the newest data in a table is, against a promise like “under 24 hours” (lesson 41).
Idempotent
Running it twice leaves the same result as running it once (lessons 6, 34).
Image
A frozen, runnable package of code, dependencies and OS bits, built from a Dockerfile (lesson 44).
Lakehouse
Files in object storage with a table format (Delta, Iceberg) adding transactions and versions (lesson 12).
Lineage
The graph of which tables are built from which (lesson 41).
Lock file
Exact versions of every dependency, so an environment can be rebuilt identically (lesson 42).
Logical date
The date a pipeline run is for, not the date it happens to run (lesson 33).
OLTP / OLAP
Databases for many small transactions vs databases for big analytical queries (lesson 5).
Orchestrator
The system that schedules tasks, respects dependencies, retries and backfills (Part 5).
Partition
Data split into folders by a column, often the date, so queries can skip the rest (lesson 11).
Predicate pushdown
Applying a filter while reading, so rows that fail it are never loaded (lesson 15).
PSI
Population Stability Index: how much a feature’s distribution has shifted, by bins (lesson 65).
Registry
Named, numbered model versions with movable aliases like “champion” (lesson 53).
Rollback
Putting the last good version back: an alias move or a redeploy of an older tag (lesson 69).
Schema evolution
Changing a table’s columns over time without breaking its readers (lesson 13).
Shuffle
Moving rows between machines so equal keys meet, the costly step of distributed jobs (lesson 19).
SLO
Service level objective: a target users would notice, like 99.9% of requests succeeding (lesson 67).
Training/serving skew
Any difference between the features a model trained on and the ones it gets live (lesson 54).
Upsert
Insert new rows and update existing ones by key, in one statement (lesson 6).
Watermark
The latest timestamp already loaded, so the next run takes only newer rows (lesson 23).

Versions

Every snippet in the course was run (or linted) with exactly these versions. Tools move on; the ideas last longer than the version numbers.

actionlint 1.7.4.20Airflow 2.10.4confluent-kafka 2.6.1Dagster 1.9.6dbt 1.8.9dbt-duckdb 1.8.4deltalake 0.22.3DuckDB 1.1.3FastAPI 0.115.6httpx 0.28.1Kafka (Redpanda) v24.2.13Kubernetes API 1.31kubernetes-validate 1.31.0MLflow 2.19.0pandas 2.2.3pandera 0.21.1Polars 1.17.1Postgres (Compose lesson) 16prometheus-client 0.21.1PyArrow 18.1.0Pydantic 2.10.4pydantic-settings 2.7.1PySpark 3.5.3pytest 8.3.4Python 3.12scikit-learn 1.5.2SciPy 1.14.1