🧱 Foundations · Chapter 1
What Data Engineering Actually Does
Apps create data. Data engineers make that data trustworthy, timely and usable at scale.
Study this lesson free in the app →
The basics
Data engineering is building and running the systems that move data from where it is created to where someone makes a decision with it — reliably, on time and at a sensible cost.
The problem it solves: an app's database is designed to run the business right now — book a ride, take a payment. It is bad at answering "how much did Pune earn last quarter?" and will slow down if you make it try. Someone has to copy, clean and reshape that data into places built for questions, without losing or duplicating any of it.
The mental model: plumbing. Data flows through five stages — source, ingestion, storage, transformation, serving — and the data engineer guarantees it arrives clean, complete and fresh, and notices within minutes when a pipe bursts.
Words you must know 5
- Pipeline
- an automated path that moves and reshapes data
- Data lake
- cheap storage that keeps raw data unchanged, forever
- Data warehouse
- modelled tables built for analytical queries
- Freshness
- how old the newest row in a table is
- Idempotent
- a job you can re-run without creating duplicates
Explained
A rider taps Book. In that one second, a payment must not double-charge, a driver must be found, and by tomorrow morning the finance team must be able to say exactly how much the city earned.
One of those is app engineering. The rest is data engineering.
Friday, 9 PM, heavy rain
Thousands of riders open the app at once. Drivers ping their location every few seconds. Requests, payments, cancellations and ratings pour in.
The platform must, at the same moment:
- show nearby drivers in under a second
- match rider and driver fast
- never charge anyone twice
- keep every event for audit
- let operations see demand by city within minutes
- feed tomorrow's pricing and ETA models
No single database is good at all six. So the work gets split across specialised systems — and the person who designs that split is the data engineer.
In plain words
A data engineer builds the plumbing.
Someone else decides what the water is for. You make sure it arrives — clean, on time, in the right pipe, without leaks, and you know within minutes when a pipe bursts.
The five stages, precisely
Every data platform on earth is some version of this chain:
- Source — apps, databases, APIs, devices, files
- Ingestion — move data out of the source without hurting it
- Storage — a durable, cheap, immutable landing zone (the lake)
- Transformation — clean, join, model, aggregate into business meaning
- Serving — warehouse tables, dashboards, APIs, ML features
Wrapped around all five: orchestration (what runs when), quality (is it right), observability (do we know when it breaks), and governance (who may see it).
The shape to memorise
apps ──▶ operational DB (run the business NOW)
│
└────▶ event stream ──▶ real-time consumers (seconds)
│
└────▶ raw lake ──▶ transforms ──▶ warehouse ──▶ dashboards / ML
(forever) (minutes-hours) (answers)Read it left to right as speed decreasing, meaning increasing. The left is fast and dumb. The right is slow and smart.
Why big platforms look like this
At small scale you can get away with one Postgres and a cron job. It breaks for three reasons, always in this order:
- Contention — analytics queries slow down the app that pays the bills
- Volume — location pings arrive faster than rows can be indexed
- History — the business wants 7 years of facts; the app only wants today's state
Splitting operational from analytical is not architectural fashion. It is what happens after the first outage caused by a dashboard.
OLTP runs the business now. Kafka carries the facts. The lake keeps the history. The warehouse answers the questions.
The mistake beginners make
Pointing the dashboard at the production database.
It works for a month. Then one analyst writes a GROUP BY over 400 million rows on a Friday evening, and bookings start timing out. Now it is an incident, not a query.
Words to know
| Pipeline | An automated path that moves and reshapes data from source to destination. |
|---|---|
| Ingestion | Getting data out of a source system and into your platform. |
| Data lake | Cheap durable storage holding raw, immutable data in its original shape. |
| Data warehouse | A query engine plus modelled tables, optimised for analytical questions. |
| Serving layer | Where consumers actually read: dashboards, APIs, ML feature stores. |
| Freshness | How old the newest data in a table is. The most-watched pipeline metric. |
In two minutes
- Data engineering owns the path from where data is produced to where a decision is made.
- Every platform is five stages: source → ingestion → storage → transformation → serving.
- Around them sit orchestration, quality, observability and governance.
- Operational databases run the business now; the lake keeps raw history; the warehouse answers questions.
- One Postgres breaks in a fixed order: contention, then volume, then history.
- Data bugs return plausible wrong numbers, so checks like freshness and reconciliation matter more than in app code.
- Senior answers talk about guarantees — freshness, correctness, cost, recoverability — not tool lists.
Test yourself
1. A dashboard query is slowing down ride bookings. What is the root cause?
- The dashboard SQL is badly written
- Analytical and operational workloads share one database
- The warehouse is undersized
- Too many users opened the dashboard
Show the answer
Analytical and operational workloads share one database — Bad SQL made it visible, but the design flaw is that one system serves both transactions and analytics. Separate them and a bad query costs you a slow dashboard, not lost revenue.
2. Which layer keeps data in its original, unmodified form forever?
- The operational database
- The raw data lake
- The warehouse mart
- The BI dashboard
Show the answer
The raw data lake — Raw immutable storage is your undo button. If a transform has a bug, you re-run it from raw. If you overwrote raw, the data is gone.
3. What most separates a senior answer from a junior one when describing your work?
- Naming more tools
- Talking about the guarantees you provide
- Mentioning data volume in terabytes
- Listing programming languages
Show the answer
Talking about the guarantees you provide — Tools change every two years. Guarantees — freshness, correctness, recoverability, cost — are what a business actually buys from you.
4. Which is the correct order of the five stages of a data platform?
- Ingestion → Source → Storage → Serving → Transformation
- Source → Storage → Ingestion → Transformation → Serving
- Source → Ingestion → Storage → Transformation → Serving
- Source → Transformation → Ingestion → Storage → Serving
Show the answer
Source → Ingestion → Storage → Transformation → Serving — Data is produced at a source, ingested out of it, landed raw in storage, then transformed and served. Transforming before landing raw (the last option) throws away your ability to reprocess.
5. The dashboard says yesterday's revenue was ₹4.1 crore; the payments system says ₹4.3 crore. Which check would have caught this before finance did?
- A reconciliation check comparing warehouse totals with the source system
- A faster Spark cluster
- More filters on the dashboard
- Moving the warehouse to another cloud
Show the answer
A reconciliation check comparing warehouse totals with the source system — Reconciliation compares counts and sums between source and destination and alerts on a gap. Speed and tooling don't detect missing rows; only a check against the source does.
6. The warehouse already has clean, modelled tables. Why keep the raw data in the lake as well?
- It's only a backup in case the warehouse goes down
- Analysts prefer to query raw JSON
- The warehouse can't store more than a year
- Transformations have bugs and questions change — raw history lets you rebuild any table from scratch
Show the answer
Transformations have bugs and questions change — raw history lets you rebuild any table from scratch — If a transformation was wrong for three months, cleaned tables carry the error; only the untouched raw data lets you replay with fixed logic. 'Backup' is the tempting answer, but the real value is re-processing, not disaster recovery.
There are 8 questions, 3 puzzles and 5 recall cards for this lesson in the app — the recall cards come back on later days, just before you would forget.
Start this lesson →