Shelves / Data Engineering for Analytics
DE·00
Start Here: From Events to Decisions
For engineers who build applications and now need to answer questions about them: what data engineering for analytics is, the journey from TiffinBox's orders and events to a finance dashboard and a live kitchen screen, the vocabulary (OLTP and OLAP, ETL and ELT, warehouse and lakehouse, batch and stream), how the chapters build the platform, and how to study the volume.
Start here: how to use this volume
What this volume is
The roadmap's earlier volumes build TiffinBox the application. This volume, beyond the roadmap's original parts, builds what turns the application's data into decisions: revenue by kitchen and month, churn after a price change, delivery times by area, a live view of kitchens falling behind. That's data engineering for analytics: getting data out of operational systems, storing it in shapes and formats built for analysis, transforming it with tested code, running it reliably, keeping it correct, lawful and affordable.
Every chapter has the usual shape: Start here with a measured example; How deep to go; the full chapter; a Lab with real measurements (DuckDB, PostgreSQL, Spark, dbt, Iceberg, Parquet, and small simulations where a system can't run on one machine, labelled as such); and a Revision sheet.
- New to analytics? Read this chapter, then 01 to 10 in order.
- Experienced? Skim the revision sheets, then go to the labs; they show the failure modes (double counting, duplicates after retries, processing-time windows, small files) that experienced teams still ship.
The journey of one number
"Revenue for kitchen 12 in October" travels like this:
order placed → PostgreSQL (OLTP) ──CDC──→ raw tables in the lake/warehouse ──dbt──→ stg_orders, stg_payments
└──→ fct_orders (grain: one order) ⋈ dim_kitchen (type 2)
payment-provider settlement file ──load──→ raw ──reconciliation check──┘
orchestrator (nightly, idempotent, per-day partitions) · quality checks before publishing · access: finance role
→ dashboard: "Kitchen 12, October: ₹4,82,300" and in parallel:
order status events → Kafka → stream job (event time, watermark) → live kitchen dashboard (provisional minutes)
Each arrow is a chapter: storage and engines (01), modelling (02), batch processing (03), transformations (04), orchestration (05), streaming (06), file and table formats (07), quality (08), governance and cost (09), and the whole platform as a project (10).
Vocabulary
| Term | Meaning |
|---|---|
| OLTP / OLAP | transactional workloads (few rows, many writes) / analytical workloads (many rows, few columns) |
| warehouse | a database built for analytics (columnar, MPP), e.g. BigQuery, Snowflake, Redshift |
| lakehouse | analytical tables as open files in object storage with a table format (Iceberg, Delta) |
| ETL / ELT | transform before loading / load raw, then transform in the warehouse |
| batch / stream | process bounded periods (yesterday) / process events continuously as they arrive |
| CDC | change data capture: reading a database's change log to copy changes elsewhere |
| fact / dimension | measured events at a grain / descriptive context for them |
| data contract | an agreement on schema, meaning, quality and freshness between producer and consumers |
How to study this volume
A routine that works
- Get a real dataset: TiffinBox's generated orders (chapter 01's lab) or an export from your own work.
- Run each lab, then change one parameter and predict the result before running it.
- Build the project incrementally (chapter 10): storage and models first, then orchestration, quality, streaming and governance.
- Reconcile everything: every number you publish should have a check against its source.
Warm-up exercises
- Write down three questions your team asks that the application database answers slowly or not at all.
- For one of them, define the grain, the measures and the dimensions.
- Find one pipeline you know that appends on retry. What would a rerun do?
- Find out how your warehouse (if you have one) bills, and the cost of its most expensive query last month.
Glossary
- Grain: what one row of a fact table represents.
- Partition: a slice of a table (usually by date) stored separately so it can be skipped or replaced.
- Idempotent: safe to run more than once with the same result.
- Watermark: the event-time point a stream processor assumes no earlier events will arrive.
- Snapshot: a committed version of a table in a table format.