The Data Engineering Interview Field Guide
Practice the AI-driven software development lifecycle for data engineering with thirty interview essays and eleven SQL labs. Design a change, test it and decide whether to release it.
Practice specifying, building and reviewing a data system with a coding agent, from the grain of one fact to the release decision.
On Friday, a school orders six field guides from Maya’s bookshop. Four copies leave on Saturday. The remaining two leave on Monday. At Sunday close, what should Maya’s dashboard say?
Six ordered. Four shipped. Two still owed. All three numbers describe the same order line. Each has a different clock. Now imagine an interviewer hands you a table called orders, gives you a whiteboard, and asks for daily fulfillment metrics. What would you draw first?
I’d write one sentence for each number before drawing a table. A customer committed to buy six copies on Friday. A warehouse handed four copies to a carrier on Saturday. At the Sunday cutoff, two copies were still due. Those sentences tell us what evidence to look for. An order record can establish the first number. A shipment record can establish the second. The third needs a starting position, the intervening activity, and a cutoff.
That is where this series starts. If you already design pipelines for a living, you probably know the words fact, dimension, and snapshot. The useful rehearsal is explaining why one line on the whiteboard becomes two tables, which question gets easier as a result, and which answer your source data can actually support.
One order on the whiteboard
| If the interviewer asks… | What one row represents | Check it against the order |
|---|---|---|
| How many copies shipped each day? | One order-line quantity in one shipment event | Saturday 4, Monday 2. |
| How many copies were owed at each close? | One eligible order line at one daily cutoff | Friday 6, Saturday 2, Sunday 2, Monday 0. |
| How long did complete fulfillment take? | One order line, updated at successive milestones | First shipment Saturday, fully shipped Monday. |
The second and third rows both describe progress, and they justify different designs. A row updated on Monday can tell a buyer that fulfillment is complete. A buyer asking how much work the warehouse faced on Sunday needs history. If the source only gives you today’s status, Sunday’s answer has to come from somewhere else.
The ten series below follow the decisions that come next. We’ll put the facts and dimensions into a star, preserve changing history, combine shipments with refunds, and check whether a replay changes the answer. By the time we reach lakehouses and data mesh, we’ll have a specific workload, a deadline, and a team that needs to act on the result.
Practice the follow-up. Close the guide and sketch the three rows above. Now give the warehouse a scanner that sends Saturday’s event twice. Which number should change? Next, let Monday’s genuine shipment arrive on Tuesday. Which day should change? Carry those two questions into whichever series you read first.
Run an AI-driven development interview
Give the candidate this ticket: “Show Maya which promised handoffs still need attention. Four of six books have shipped, and one warehouse scanner is offline.” The candidate can use a coding agent. Before either writes SQL, ask what Maya can reasonably tell the school. She can say that two copies lack a confirmed handoff. A disconnected scanner gives her no way to know exactly where those copies are.
Carry that decision through the software development lifecycle (SDLC). One person can play both author and reviewer in separate passes. In a paired interview, give the reviewer a case the author has yet to see.
| Stage | What the engineer asks the agent to produce | Evidence the reviewer asks for |
|---|---|---|
| Specify | A ticket naming the consumer, the grain, the deadline and what counts as a handoff. | Predict the result for a quiet warehouse and for a disconnected one. Ask the warehouse owner to settle any disputed meaning. |
| Design | Two small designs for checking overdue promises, with a decision record. | Show how each finds an order that never produced a scan. Estimate peak work and name the measurement that would change the choice. |
| Implement | A scoped patch, synthetic records and a command that reproduces the result in a disposable database. | Trace one promise through the changed rows. Keep production access and notification delivery outside this exercise. |
| Review and test | A pull request with the data contract, diff and author’s tests. | The reviewer calculates an expected answer independently, introduces a retry or a late event, and runs the same check against the first patch and the repair. |
| Release | A shadow run that computes results alongside the existing system and sends no alerts. | Compare cases by promise ID. A duplicate alert or a change to a previously issued finance file blocks promotion. Name who can switch readers back. |
| Operate and learn | A trace of the first discrepancy, the affected IDs and a bounded replay plan. | Reconcile any effect that already reached a recipient. Add the smallest input that reproduces the incident to the next review. |
Try a twelve-minute pull-request review. Spend two minutes predicting the rows, four reviewing the proposed query, four running an unfamiliar fixture and two recording your decision. Give one point each for a clear contract, an independent expected answer, a failure reproduced on the original patch, and a repair that also passes the old cases. For a release decision, also require a monitored signal and a recovery path. A second agent can suggest counterexamples. The reviewer owns the expected results.
Two accounts of recent engineering practice informed this exercise. OpenAI describes giving agents access to repository knowledge and checks they can run. Anthropic distinguishes what an agent reports from the state its actions actually produce. In this guide you can apply that distinction by counting alerts at a fake recipient. The bookstore workloads, acceptance thresholds and scoring are Alloconomy practice designs. OpenAI’s engineering account · Anthropic on evaluating agents
When the agent itself changes
Suppose yesterday’s coding agent wrote a correct query and today’s model proposes a shorter one. Save the task brief, schema revision, allowed tools, model identifier if available, proposed diff and test results with the change. A reviewer can rerun a saved SQL patch exactly. Generating a fresh patch from the same prompt is a different experiment.
To compare two agent setups, give each the same starting repository, task and time budget. Run several independent attempts on fresh fixtures. Report how many patches passed the held-back cases, how many required the reviewer to intervene, and minutes or cost per accepted change. Two different SQL statements can earn full credit for the same correct rows. When either setup fails, keep the failing input, review the tool actions that produced the patch and change one thing before rerunning the comparison.
Reading the book references
For dimensional modeling, start with The Data Warehouse Toolkit by Ralph Kimball and Margy Ross. Christopher Adamson’s Star Schema: The Complete Reference explores how to design facts and dimensions. For retries and recovery, read Designing Data-Intensive Applications by Martin Kleppmann and Chris Riccomini. For agreements between data producers and consumers, see Data Contracts by Chad Sanderson, Mark Freeman and B. E. Schmidt. James Serra’s Deciphering Data Architectures compares warehouses, lakes and lakehouses.
Choose a practice route
Twenty minutes before a modeling round. Predict the split-order total, repair the shipment-to-refund join, then explain a sale that falls on a dimension boundary. Write one grain statement and one falsifying test for each. Return to any calculation you could not reproduce from memory.
A system design rehearsal. Give yourself 35 minutes for the closing exception-feed case. Draw the input, identity, state, clock, and observable output. Use the recovery and physical design essays to challenge whichever part of your first answer felt easiest.
A week of preparation. Spend the first two sessions on grains, snapshots, identity, and time. Use the third to reconcile money and repair an overcount. Use the fourth to practice failure recovery and physical design, the fifth to migrate a contract and defend an architecture. Finish by solving one familiar prompt in an unfamiliar domain, such as a ride request, a reopened support case, or an ad impression.
In each web lab, run the supplied query, predict the next result, then edit the SQL yourself. The database is a small, fictional SQLite fixture. Counts and dollars can be verified by hand. Performance timings on these samples are unsuitable for sizing a production system.
Ten series and thirty essays
1. Grain and the star schema
What earns a row in the warehouse?
2. The three fact table designs
Do we need to remember an event, a position at a cutoff, or a process moving through milestones?
- Transaction facts remember occurrences
- Periodic snapshots remember the quiet days · SQLite lab
- Accumulating snapshots remember milestones
3. Less familiar fact patterns
How do you model an absence, a state that lasts for weeks, or a summary that has lost detail?
- Find the dispatch that never happened · SQLite lab
- Store the interval between changes · SQLite lab
- Decide what a summary is allowed to forget · SQLite lab
4. Dimensions and identity
Which descriptions can we attach to a fact without changing what it counts?
- Two storefronts both sell product 42
- Five dates and one calendar
- A field guide belongs on two shelves
5. Slowly changing dimensions and historical truth
Which version of a product or customer did the question ask for?
- Which changes deserve a new row
- Resolve the version at the sale · SQLite lab
- Reproduce the report before the correction · SQLite lab
6. Combining facts and reconciling measures
Can we add another process, or allocate a cost, and still explain every dollar?
- Compare shipments and refunds without multiplying either · SQLite lab
- Allocate one carrier bill to two lines · SQLite lab
- Give a correction somewhere to go
7. Pipelines that can recover
What happens when the same shipment arrives twice, or yesterday’s shipment first arrives today?
- Choose what the source must retain
- Crash after the write · SQLite lab
- Decide when yesterday can change
8. Physical design and serving
What must the storage engine read or write to answer the next request?
- One order lookup and a year of shipments
- Choose a layout from a real filter
- When one school district becomes half the traffic
9. Data contracts and safe change
What may a downstream team rely on when the producer changes its system?
- The decimal that changed its meaning
- Migrate the consumers that depend on the field
- Fresh, complete, and fit to use · SQLite lab
10. Warehouses, lakes, lakehouses, and mesh
Which architecture would you choose for this workload, and what evidence would make you change it?
- Where should each representation live
- Who owns the definition of a shipment
- The five-minute exception feed
Check your interview answer
Can a colleague identify which source record earns a row, reproduce the result on six books, and predict what a retry or late correction changes? For a senior system design answer, add a measurable service target, an owner for a disputed result, and an alternative you would reconsider under a named change in load or requirements. These are practice criteria for this guide.