Data Engineering
Data is almost never produced for the people who need it. Data engineering builds the systems that move, store, and shape it so analysts, ML engineers, and applications can rely on it. This book is for software engineers who know SQL and the basics of system design and want to understand how a modern data platform fits together. It closes by building one demanding pipeline end to end: the pretraining corpus for a language model.
16 sections
Start readingDownload PDFGlossaryContents
Section titled “Contents”- 5.1 Async fetch with resume, checksums, and license capture
- 5.2 Extract, normalize, and quality filters
- 5.3 Exact dedup: paragraph hashes, a Bloom screen, and a sort-merge confirm
- 5.4 Near-duplicate dedup: MinHash, LSH, union-find, and decontamination
- 5.5 PII scrub with typed placeholders and audit spans
- 5.6 Parquet shards, the manifest, and the document-hash split
- 5.7 Tokenize and pack to llm.c .bin
- 5.8 Licensing ledger verification and the datasheet
- 5.9 CorpusBuild: the pipeline as a durable workflow
What you will be able to do
Section titled “What you will be able to do”- Place any data system on the lifecycle of generation, ingestion, storage, transformation, and serving, and choose storage by access pattern: row stores for OLTP, column stores for OLAP, open table formats for the lakehouse.
- Design ELT pipelines that load raw data cheaply and transform it in place with SQL.
- Build batch and streaming jobs with event time, watermarks, and windows, and state exactly which delivery guarantee a job provides.
- Make every pipeline idempotent and replayable, with tests, contracts, and backfills that work.
- Build a deterministic, licensed, deduplicated training corpus and explain every stage of it.
Ways through this book
Section titled “Ways through this book”Reading every chapter takes about thirteen to eighteen weeks at eight to ten hours a week.
- The whole book, in order (13 to 18 weeks): Chapter 1: Foundations through Chapter 5: Corpus Pipeline. Chapters 2 and 3 can go in either order.
- New to data, or coming from analytics and BI (about 10 weeks): Chapter 1: Foundations, then Chapter 2: Storage and Warehousing, then Chapter 4: Orchestration and Modeling, where dbt lives.
- Coming from backend or systems work (about 8 weeks): skim Chapter 1: Foundations, then Chapter 3: Batch and Streaming Processing, then Chapter 4: Orchestration and Modeling.
- Building training data for ML (about 10 weeks): Chapter 1: Foundations, Chapter 2: Storage and Warehousing for columnar files, then 5.1 Async fetch through 5.8 Licensing ledger verification. Read Durable Orchestration and Workers in Systems Engineering before 5.9 CorpusBuild.
Before you start
Section titled “Before you start”You should be comfortable writing SQL and know the basics of System Design from Systems Engineering. For the corpus chapter, the hashing and Bloom filters of Programming and Algorithms, the asyncio primer in Programming and Algorithms, and the licensing and PII policies in AI Engineering all help. From here, Systems Engineering covers the messaging and search stack data platforms run on, and AI Engineering and AI Engineering consume the corpus this book builds.
New to these books? How to read these books explains how sections, review questions, and solutions work.
The running example
Section titled “The running example”A small Streamflow orders pipeline runs through Chapters 3 and 4, locally on DuckDB with no cloud setup. It uses the same Streamflow platform as Systems Engineering and Software Engineering.
| Stage | File | Chapter |
|---|---|---|
| Raw to clean (Spark, bronze to silver) | spark/orders_bronze_to_silver.py | 3 |
| Clean to tested marts (dbt, silver to gold) | dbt/ | 4 |
| Orchestrate the DAG (Airflow) | airflow/streamflow_orders_dag.py | 4 |
Solution code for the corpus pipeline lives in course/solutions/python/corpus/, with the interface contracts each section implements under course/contracts/.