Interviewing
Data Engineer Interview Prep for 2–4 Years of Experience
Six weeks, one round of a mid-level loop each, weighted by what gets candidates rejected.
It opens on your dashboard and ticks itself off as you go. Every step below is a chapter or an exercise that already ships.
01
When you finish, you can
You can pass the SQL, Python, modeling, design, Spark and behavioral rounds at mid-level.
Loop day Ready for a mid-level loop
02
The plan, 6 weeks
Ordered by what each one buys you, not by topic. Every step says why it is here.
Week 01 · ~3h
The SQL screen: correct, then fast
You can write joins, windows and dedupes correctly against a clock.
Skip this if you sessionize and rank top-N per group unaided in 20 minutes.
- SectionClarify, contract, build, verify, explain7 minThe loop you are graded on, before any syntax.
- SectionFan-out: when a join doubles your metric7 minThe most-asked SQL trap, at every level.
- InterviewDISTINCT vs GROUP BY6 minFan-out asked as a definition. DISTINCT usually hides it.
- ExerciseTop buyers by revenue15 minin the studioAggregate at the right grain first, then rank.
- SectionTop N per group6 minOn the screen in almost every loop.
- ExerciseTop two tracks in every genre20 minin the studioTop N per group, where the ties matter.
- SectionROW_NUMBER for deduplication6 minName the dedupe key before you write the window.
- ExerciseDeduplicate order snapshots15 minin the studioLatest row per key: the most reused pattern.
- ExerciseRunning daily revenue15 minin the studioRunning totals. The frame clause is the test.
- SectionGaps and islands: date minus row number8 minStreaks and runs. Learn the trick once.
- ExerciseSessionise plays with a 30-minute rule30 minin the studioSessions from a 30-minute gap: the classic mid-level ask.
- InterviewDay 1 / 7 / 30 retention6 minThe definition is the hard part. Say which one.
- InterviewIN vs EXISTS6 minThe opener most screens use. NULLs decide it.
- SectionEdge-case checklist6 minNULLs, ties, empty groups. Rejection notes name these.
- ExerciseInterview top buyers with ties18 minin the studioStretch: the same pattern at interview grade.
- QuestionsSQL · Query formulation15 minSay the output contract before you write anything.
Week 02 · ~6h
Python: the data-wrangling round
You can parse, group, dedupe and join records in plain Python.
Skip this if you write top-N per key from raw JSON unaided.
- SectionGrouping records by key6 minMost data engineering coding rounds are dicts, not algorithms.
- SectionJSON payloads, one document at a time6 minMessy JSON is the usual phone-screen input.
- ExerciseFlatten nested event payloads30 minin the studioNested payloads to flat rows, keys intact.
- ExerciseSessionize an unsorted event feed35 minin the studioLast week in SQL, now without SQL.
- SectionDedupe by business key6 minSay which record wins before you write code.
- ExerciseBuild a golden record from several sources40 minin the studioDuplicates that disagree. Pick a winner and defend it.
- ExerciseTop N per key, in bounded memory35 minin the studioTop N per key with a heap, not a full sort.
- ExerciseLongest browsing run with no repeated page30 minin the studioThe sliding window, as an algorithms round asks it.
- ExerciseCount ledger runs that net to a target30 minin the studioPrefix sums in a dict. Reported at Paytm for data engineers.
- SectionIn-memory joins with lookup dictionaries6 minIndex once, join many. They check the complexity.
- ExerciseJoin two feeds and measure the fan-out35 minin the studioTwo feeds, one key, and the rows that do not match.
- ExerciseRetry under a policy, as a decorator35 minin the studioRetries come up whenever an API is involved.
- InterviewA 200 GB file on a 16 GB box6 minStreaming versus loading, asked as a design question.
- InterviewMoney without floats6 minA correctness trap that sinks otherwise clean code.
- InterviewThe list that remembers6 minA classic output-prediction trap. Explain it in one breath.
- InterviewMutable vs immutable6 minThe conceptual opener behind half the bugs above.
- QuestionsPython · Approach & data structures15 minName the data structure before you write a loop.
Week 03 · ~4h
Data modeling: the round most people fail
You can declare the grain and defend a star schema with history.
Skip this if you state the grain first and pick SCD types without hesitating.
- SectionClarify: turning a vague request into a spec7 minQuestions before boxes. Skipping them is a common fail.
- SectionDeclaring grain before you build6 minAn unstated grain is the most-cited modeling failure.
- InterviewWhat is the grain of a table6 minOne sentence, then an example. Nothing longer.
- SectionThe four-step design process7 minProcess, grain, dimensions, facts: a script for the round.
- InterviewFact or dimension6 minSounds basic. The follow-up is where it gets hard.
- ExerciseSubscription warehouse grain35 minin the studioPick the grain, build the star, defend both.
- SectionStar vs snowflake: the trade-offs6 minAsked by name. Know when a snowflake earns its joins.
- SectionNatural vs surrogate keys6 minJoining on natural keys is a named failure reason.
- ExerciseOrders you can trust eight months later45 minin the studioKeys and totals that survive every join.
- SectionChoosing the right SCD type7 minType 1 versus Type 2, argued from what the business needs.
- InterviewWalk me through the SCD types6 minName the types, then pick one for a real column.
- ExerciseAddresses that stay true to the past40 minin the studioHistory that still answers where they lived at order time.
- ExerciseRefunds without double counting45 minin the studioRefunds as facts, without double-counting revenue.
- InterviewDesign a financial ledger6 minA full design prompt, taken from a real loop.
- SectionNarrating a modeling answer6 minGrain first, then the trade-offs, out loud.
- QuestionsData Modeling · Model design15 minDesign prompts. Open every answer with the grain.
Week 04 · ~4h
Pipeline design: safe to run twice
You can design a batch pipeline that survives retries, backfills and late data.
Skip this if you explain idempotent writes and a backfill plan without notes.
- SectionThe requirements-first method7 minRequirements before boxes. The happy path alone fails.
- SectionThe questions to ask first6 minNot asking is a common reason design rounds fail.
- SectionHow to choose without overbuilding6 minStreaming by default reads as over-engineering here.
- SectionIdempotency: safe to repeat7 minThe word every design round is waiting to hear.
- InterviewAppend, merge or overwrite6 minThe write mode decides what a rerun does.
- SectionBackfills: rewriting history safely7 minBug fixed, six months wrong. Plan the rewrite.
- SectionWhich runs exist, and when they fire6 minThe logical date trips most candidates. Predict the runs.
- ExerciseThe fact arrived first45 minin the studioLate facts, joined without losing or doubling rows.
- ExerciseSLA-aware alerting flow40 minin the studioRetries, alerts, and an SLA someone actually owns.
- ExerciseFive minutes behind the source45 minin the studioCDC in practice: updates and deletes, minutes behind.
- InterviewFail the record or fail the job?6 minQuarantine versus stop: a judgement call they probe.
- InterviewDeduplicating with a version6 minDedupe on retry, asked the way a loop asks it.
- InterviewChoosing a partition key6 minPartitioning decides what a rerun can safely replace.
- ChapterSystem & Pipeline Design20 minHow design rounds are run, and what gets scored.
- QuestionsData Pipeline · Failure & recovery15 minSay what a rerun does before they ask.
Week 05 · ~3h
Spark: the mid-level round
You can explain shuffles, joins and skew from a Spark plan.
Skip this if you can say why a join shuffled, and fix it.
- InterviewThe three components, named6 minDriver, executors, cluster manager: the warm-up question.
- Sectionrepartition vs coalesce6 minAsked by name, and often answered backwards.
- SectionAnatomy of a shuffle7 minEvery Spark performance answer starts from the shuffle.
- SectionReducing and avoiding shuffles6 minThe fix they want after you name the problem.
- SectionBroadcast (map-side) joins6 minThe first fix for a slow join with a small side.
- Exercisebroadcast() with auto-broadcast off, and the case where Spark ignores it20 minin the studioAuto-broadcast off, lookup join shuffling. Make broadcast() work anyway.
- InterviewLogical vs physical plan6 minReading a plan at a high level is expected.
- SectionDetecting skew in the Spark UI6 minSpot the straggler. Designing salting is Senior depth.
- ExerciseWhere does skew show up? Reading task metrics, not the DAG20 minin the studioFind skew in task metrics, and where it is absent.
- InterviewWalk me through fixing skew6 minMid-level answer: symptoms, AQE, then broadcast.
- SectionWhat AQE fixes at runtime6 minKnow what AQE fixes before tuning by hand.
- ExerciseIf AQE coalesces anyway, does spark.sql.shuffle.partitions still matter?20 minin the studioWhat the partition setting still controls once AQE is on.
- SectionFile formats: columnar vs row6 minParquet versus CSV, argued in one minute.
- InterviewWhy small files hurt, step by step6 minA production problem every Spark team has hit.
- InterviewHow many partitions for 1 TB?6 minBack-of-envelope sizing, asked with real numbers.
- QuestionsApache Spark · Debug & fix15 minDiagnose aloud: symptom, cause, then the fix.
- QuestionsApache Spark · Conceptual & architecture15 minFundamentals said cleanly. Deeper internals are Senior depth.
Week 06 · ~4h
Loop week: the stories and the rehearsal
You can tell three STAR stories and walk a full loop.
Skip this if your ownership, incident and conflict stories are rehearsed aloud.
- ChapterThe Recruiter & Hiring-Manager Screen20 minYour two-minute story, and the questions to ask back.
- ChapterBehavioral Storytelling20 minOwnership, incident and disagreement stories, in STAR form.
- InterviewA pipeline incident you owned6 minThe incident story every loop asks for, told end to end.
- InterviewA time you made a mistake6 minThe most-asked behavioral prompt. Own the mistake in sentence one.
- InterviewA disagreement, and how it resolved6 minDisagree with evidence, then commit. Asked at Amazon, Meta, Google.
- InterviewConflicting priorities and deadlines6 minManagerial rounds at product and services firms both ask it.
- ChapterLive Coding: SQL & Python20 minHow live rounds are scored beyond a correct answer.
- ChapterTake-Home Projects20 minScale-ups and services firms often send one instead.
- ChapterAmazon20 minLeadership Principles are scored in every round.
- ChapterFlipkart20 minModeling, SQL, then a Spark machine-coding round.
- ExerciseFlipkart: a daily snapshot from sparse changes35 minin the studioStretch: a Flipkart-style snapshot question.
- ExerciseAmazon: net revenue across two fan-outs30 minin the studioStretch: Amazon-style fan-out, twice over.
- QuestionsBehavioral · Ownership & delivery15 minTwenty reported prompts. Point one of your stories at each.
03
Start it now
Reading is free and needs no account. The plan itself tracks on your dashboard.
