Exercises: The Data Engineering Interview
These are practice, not study. Most of them require a timer, a whiteboard, or another person.
Exercises marked 🧪 use code/interview_drills.py.
Warm-Up
Exercise 39.1 — Score yourself against the rubric
Difficulty: ★☆☆ · Time: 20 minutes · 🧪
python code/interview_drills.py --rubric
- Recall your last system-design interview (or a design discussion at work). Score yourself on all six lines.
- Where did your time go? Estimate the minutes spent on each.
- §39.3 says most candidates invert requirements (25%) and the diagram (10%). Did you?
- Which single line would gain you the most, and what would you do differently?
Exercise 39.2 — The six questions
Difficulty: ★☆☆ · Time: 20 minutes
- Write §39.3's six requirements questions from memory.
- Apply them to three problems: "design a system for real-time inventory," "design a customer 360 view," "design an ML feature pipeline."
- For each, say which question's answer would change the design most.
- §39.3 says question 5 — does history change? — is the one that marks you out. Why that one?
Exercise 39.3 — Read the drills
Difficulty: ★☆☆ · Time: 30 minutes · 🧪
python code/interview_drills.py --sql
- The fixture has five deliberately awkward rows. Find all five before reading the comments.
- For each of the twelve problems, predict the answer before looking.
- Which of the listed wrong answers have you produced before? Be honest; it identifies your gaps.
Core
Exercise 39.4 — Do the drills properly
Difficulty: ★★☆ · Time: 2 hours · 🧪
- Write the SQL for all twelve, against the fixture, in whatever engine you use.
- Compare against the expected answers. Record which ones you got wrong and why.
- For problems 4 and 8, check your engine's default window frame. Is it
RANGEorROWS? - For problem 10, write it with
NOT INand add a NULL to the subquery. Watch it return nothing. - §39.6 says 4 and 6 separate mid from senior. Do you agree after doing them?
Exercise 39.5 — Time yourself on a design
Difficulty: ★★☆ · Time: 45 minutes
- Set a 45-minute timer. Design a system to compute daily active users from a clickstream.
- Record yourself or write timestamps as you go.
- Afterwards, score against the rubric and compute the actual minutes spent per line.
- Case Study 1's candidate B spent 35 of 45 minutes on the diagram. What did you spend it on?
Exercise 39.6 — The trade-off sentence
Difficulty: ★★☆ · Time: 30 minutes
Case Study 1's pattern:
"<choice>, because <requirement it satisfies>,
at the cost of <specific operational downside>,
which means <who is affected and what they need to do>."
- Write it for five technologies you have actually run. The downside must be specific and operational.
- Which ones can you not complete? Those are technologies you have used and not operated, and it is useful to know which.
- Now write it for three you have not run. Notice how much weaker the downside clause is — that is what an interviewer hears.
Exercise 39.7 — The correctness round
Difficulty: ★★☆ · Time: 45 minutes
§39.7's six questions.
- Answer all six out loud, timed at three minutes each. Record yourself.
- Play it back. How many of your answers are the "software instinct" column rather than the data one?
- For "how do you know your pipeline is right," do you say the word independent? (Chapter 36 Case Study 1.)
- Add a seventh: "you need to change a transformation that six months of history was built with. What do you do?" Answer it.
Exercise 39.8 — Write the project one-pager
Difficulty: ★★☆ · Time: 60 minutes
§39.8's five things.
- Write the one-paragraph description of your capstone. Scale and acceptance criterion.
- Write the reconciliation sentence. "Gold reconciles to source to the cent, for any month, with N documented rules."
- Pick one number and prepare to defend it — including how you computed it and what it does not account for.
- Write "what went wrong" in five parts: what you believed, what happened, the cause, what you changed, what it cost you.
- Give the one-pager to someone. Ask them what question it prompts — that is what you will be asked.
Exercise 39.9 — The reverse interview
Difficulty: ★★☆ · Time: 40 minutes · 🧪
python code/interview_drills.py --ask
- Apply §39.10's test to every question you currently ask: could the answer have been bad?
- Rewrite the three weakest so a bad answer becomes possible.
- Ask "what is the last thing you deleted?" of your own team. What is the answer?
- Compute your own team's pipelines-to-dashboards ratio, and its trend.
- Case Study 2's engineer asked four questions that could not go badly. How many of yours can?
Advanced
Exercise 39.10 — Extend the drills
Difficulty: ★★★ · Time: 90 minutes · 🧪
Add three to interview_drills.py, with self-checks:
- Three more SQL problems whose wrong answers come from the fixture's awkward rows — one on a self-join, one on a pivot, one on a gaps-and-islands question.
- A
--checkmode that takes your answer and reports which listed wrong answer it matches. - A second fixture with nulls in the join keys, so problem 10's
NOT INfailure is live. - A design-round timer that prompts you through the rubric's six lines with a budget for each.
- A behavioral-answer checker that asks whether your answer contains a number.
- A company-scoring sheet built from §39.10's answers.
Then: #2 is the useful one. What does it require you to think about that a bare expected answer does not?
Exercise 39.11 — Run a mock loop
Difficulty: ★★★ · Time: 3 hours
With another person, ideally one who has interviewed candidates.
- A 45-minute system design, scored against the rubric, with the scores shared afterwards.
- A 30-minute SQL round using the drills.
- A 30-minute correctness round using §39.7's six questions.
- Twenty minutes of feedback, and ask specifically: "was there a moment where you were not sure I had done this?"
- Swap roles. Interviewing someone teaches this faster than being interviewed.
Exercise 39.12 — Diagnose a rejection
Difficulty: ★★★ · Time: 45 minutes
§39.11.
- Take a rejection you have had. Write down which round ended it, and whether you know or are guessing.
- Send the email asking which round was weakest. Note whether you get an answer.
- §39.11 says a single rejection is nearly uninformative. Do you have four or five to look across? What is the pattern?
- Have you ever asked whether a different level was open? §39.11 says it works often enough to be worth the discomfort.
Exercise 39.13 — Interview a company you are not going to join
Difficulty: ★★★ · Time: 60 minutes
The most useful exercise in this chapter, and the least comfortable.
- Take a call with a company you are not seriously considering.
- Ask all seven of §39.10's questions, and score their answers.
- Record what you learn about the questions themselves — which ones produced information, which got deflected, which felt rude.
- Refine the list. Then use it where it matters.
- Case Study 2's engineer sorted four companies in four conversations. How discriminating was your list?
Project Milestone
Exercise 39.14 — Be ready
Difficulty: ★★★ · Time: 4–6 hours
The deliverable is a folder you can open the morning of an interview.
- The project one-pager (Exercise 39.8), one page, with the reconciliation sentence in the first three lines.
- Five trade-off sentences (Exercise 39.6) for technologies you have actually run.
- The twelve SQL drills, completed, with your wrong answers and their causes noted.
- Six correctness answers, written out, in the data column rather than the software one.
- Four behavioral stories, each ending in a number.
- Your reverse-interview list, with what each answer would mean — and a rule for what would make you decline.
- The three things you do not know, stated the way §39.2 recommends: "I have not run X; I have run Y and I know Z."
Deliverable: the folder, and a mock loop (Exercise 39.11) run against it.
Item 6's last clause is the one people skip. A reverse-interview list with no decline rule is a list you will read the answers of and rationalize. Write the rule before you need it — which is Chapter 26 §26.8's pre-decided call, and Chapter 38 §38.14's build the reconciliation first, applied to your own career.