Shelves / Data Engineering for Analytics
Software Engineering · Volume 21
Data Engineering for Analytics
Turning an application's data into decisions, from first principles: why analytical engines store data by column and how that changes everything, dimensional modelling and the traps that double revenue or rewrite history, batch processing and Spark's shuffles and skew, transformations as tested code with dbt, orchestration that survives retries and backfills, stream processing with event time and watermarks, Parquet and table formats such as Iceberg, data quality and contracts, and governance, privacy and cost. Every chapter has measured labs on real tools (PostgreSQL, DuckDB, Spark, dbt, Iceberg) and ends with TiffinBox's analytics platform as a project.
Two ways to read this book
Every chapter has the same shape: Start here (first principles, plain language, small verified examples) → How deep to go (what each mastery level needs) → full-depth sections → Lab (experiments with real measured output) → Revision sheet (key ideas, numbers to remember, pitfalls, glossary, quiz).
How to use this book
- Read one topic at a time. Each topic heading has a Done tick. Tick it only when you can explain the idea aloud without looking, which is roughly mastery level L2–L3 below.
- Run the code. Every comparison block has tabs for each language; type the example out in at least two of them.
- Take the chapter quiz at the end. A score of 80% or more counts as passed. Wrong answers show the explanation, so re-read that topic and untick it if needed.
- Revisit after a delay. The roadmap's loop applies: recall, explain, implement without notes, break it, measure it.
Mastery levels
Languages used throughout
Status as of November 2026: the experiments ran on one 2-CPU lab machine with PostgreSQL 16, DuckDB 2.0, Apache Spark 4 (PySpark 4.3, local mode), dbt Core 1.12 with dbt-duckdb, PyIceberg 0.12 and PyArrow, and their real output is shown. Distributed behaviour (skew at cluster scale, stream processing under outages, data-quality failures over months) is shown with small, labelled simulations or measurements of partition sizes where one machine can't run the real thing.
Contents
- SC·00Start Here: From Events to DecisionsFor engineers who build applications and now need to answer questions about them: what data engineering for analytics is, the journey from…3 min
- SC·01How Analytical Databases WorkWhy the database that runs TiffinBox's orders is the wrong place to ask "revenue by kitchen by month for the last year", and what analytical engines…10 min
- SC·02Modelling Data for AnalysisHow to shape data so questions are easy, fast and right: facts and dimensions, choosing and declaring the grain, star schemas, conformed dimensions…8 min
- SC·03Batch Processing and SparkProcessing data too big or too slow for one query on one machine: the map–shuffle–reduce idea, Spark's driver, executors, partitions, lazy plans…9 min
- SC·04Transformations as Code: ELT and dbtWhy modern analytics loads raw data first and transforms it inside the warehouse, and how dbt turns those transformations into a tested, documented…9 min
- SC·05Orchestration and BackfillsRunning pipelines reliably on a schedule: DAGs of tasks or data assets, dependencies and data intervals, why every task must be idempotent and…8 min
- SC·06Stream ProcessingComputing on data as it arrives: event time versus processing time, tumbling, sliding and session windows, watermarks and the latency–completeness…9 min
- SC·07Lakehouses and File FormatsHow analytical data is stored when it lives in object storage rather than inside one database: Parquet's anatomy (row groups, column chunks, pages…9 min
- SC·08Data Quality, Contracts and ObservabilityKeeping analytical data trustworthy: the dimensions of quality (freshness, volume, completeness, uniqueness, validity, consistency, accuracy…8 min
- SC·09Governance, Privacy and CostRunning an analytics platform people can trust and afford: who may see what (roles, row-level security, column masking, catalog policies)…8 min
- SC·10Data Engineering ProjectsThe TiffinBox analytics platform as a project in six milestones: a lakehouse with change data capture from PostgreSQL, a dbt project with a star…3 min