Data Engineer Interview Prep · Final test · 25 questions
Data Engineer Interview Prep final test: 25 free questions
A free Data Engineer Interview Prep practice test with 25 questions drawn from the whole course. Answer at your pace and read why each option is right or wrong.
-
Q1 / 25
A distributed job groups a large dataset by key and the stage after the exchange runs thousands of tiny tasks. What is the mechanism that helps here?
- ARaising the configured number of shuffle partitions, so each task has less work to do.
- BCaching the input before the grouping, so the exchange reads from memory instead of disk.
- CCoalescing contiguous shuffle partitions can reduce the number of small tasks.
- DReplacing the grouping with a sort, since sorting avoids moving data between executors.
Show the answer
Each partition after an exchange becomes a task, and thousands of tiny tasks spend more time being scheduled than doing work. Adaptive execution can coalesce neighbouring shuffle partitions and reduce the number of small tasks. With `parallelismFirst` enabled by default, Spark ignores the advisory target size during this merge.
Next → 1 / 25 -
Q2 / 25
A reseller sales table stores a Unit Price column, and a report author drags it straight into a total. What has gone wrong?
- ANothing at row level, although the total should be divided by the row count afterwards.
- BThe column belongs in the dimension table, where a total is not offered to report authors.
- CAdditive behavior must be evaluated for each measure across each dimension.
- DNothing, provided the currency is the same on every row of the table.
Show the answer
The aggregation has to match what the value represents. A unit price is a per unit rate, so adding prices from different sales produces a number that means nothing. A minimum, maximum or average can be appropriate instead, depending on what the report is asking.
Next → 2 / 25 -
Q3 / 25
A team is hiring for a data engineering post. Which description matches what the role is expected to produce?
- AThe role mainly defines research hypotheses and trains predictive models on prepared data.
- BA data engineer develops data products and services and integrates them into systems and business processes.
- CThe role mainly interprets published results and recommends actions from finished reports.
- DThe role mainly runs company networks and staff laptops, separately from data pipelines.
Show the answer
The job is defined by what it builds and where the build lands: data products and services that other systems and business processes then consume. Delivery is not finished when a script works in isolation, it is finished when the output is wired into something that uses it.
Next → 3 / 25 -
Q4 / 25
In a distributed join one partition is eight times the median size at 400 MB, and the job only finishes when that task does. Which mechanism addresses it?
- ARaise the number of shuffle partitions, so the oversized one is divided along with the rest.
- BSplit the oversized partition into several roughly evenly sized tasks so the work spreads.
- CRaise the memory limit per task, so the oversized task fits and finishes at the same speed.
- DCache the larger input, so the oversized task reads from memory rather than from disk.
Show the answer
A partition far above the median leaves one straggler task holding the whole job open. Splitting that partition, and replicating the matching side where needed, lets its work spread across the cluster. With the default settings, a partition counts as skewed only when it is over five times the median and over 256 MB.
Next → 4 / 25 -
Q5 / 25
A windowed aggregation declares a ten minute watermark and writes with Complete output mode. Does the watermark let old aggregation state be dropped?
- AYes, but the state is only dropped when the query restarts and rebuilds from its checkpoint.
- BYes: once the threshold passes, a watermark removes old state in any output mode.
- CNo: a watermark never removes state, it decides which late records are accepted.
- DNo: Complete mode keeps all aggregation state, while Append and Update drop it once the threshold passes.
Show the answer
The watermark sets the threshold and the output mode decides what may be dropped. Append and Update write results and discard old aggregation state once the watermark passes the end of the window. Complete rewrites the entire result table at every trigger, so it has to keep every window alive. Always name the output mode beside the watermark.
Next → 5 / 25 -
Q6 / 25
You are handed two tables and asked for one row per customer per month. What has to be settled before you start writing the query?
- ADefine the row grain and key constraints before composing an advanced SQL transformation.
- BThe sort order of the final result, since a sorted output makes the shape of the answer easier to read.
- CThe database engine and its version, since each one needs different join syntax for the same result.
- DThe indexes available on both tables, since the physical layout decides what the query can return.
Show the answer
Grain is the promise about what one output row means. Settle it first, then check which key is unique at that grain, because joining against a table whose key repeats will multiply rows without raising an error. A later filter can bring the count down again, but it may discard valid matches.
Next → 6 / 25 -
Q7 / 25
A Dag normally finishes by 07:00. When it hangs, nobody notices, because a hung run never fails. What closes that gap?
- AA shorter retry interval, so that a hung run is retried before anybody would notice it.
- BA daily report of run durations, reviewed by the team during the morning stand-up.
- CA deadline alert on the run, which fires a callback once its time threshold has passed.
- DA downstream task that fails when the data is missing, which surfaces the problem for you.
Show the answer
A failure alert only fires on failure, and a run that never finishes never fails. A deadline is measured against the run itself, for example thirty minutes after it was queued, and notifies you when the run has not finished by then.
Next → 7 / 25 -
Q8 / 25
You are asked to turn purchase records into daily customer totals. The prompt says nothing about repeated purchases or records that fall around midnight. What comes first?
- AClarify input shape, output contract, constraints, and edge cases before coding a transformation.
- BWrite the tests first, since a complete test suite makes the requirements unnecessary.
- CAssume no repeats and no midnight records, since a prompt that omits them implies neither.
- DImplement the obvious version and let the interviewer raise the cases you did not cover.
Show the answer
Ambiguities of that kind change the answer, not just the code. Ask whether two purchases a second apart are one or two, and which time zone decides a day. Then state the assumption you are proceeding on, so the interviewer can correct it before you have built around it.
Next → 8 / 25 -
Q9 / 25
An interviewer asks about a design disagreement in which your proposal was rejected after the team compared the options. Which account gives the clearest evidence?
- AThe decision the team reached and the fact that you implemented it without further argument.
- BThe later problems the chosen design caused, which showed your proposal had been right.
- CYour preferred design and its advantages, with the reasons the decision went the other way.
- DBoth views, the evidence behind the decision, what you did afterwards, and what you learned.
Show the answer
A disagreement story is about how you work with people who outrank or outvote you. Showing that you understood the other case, that evidence rather than volume settled it, and that you backed the decision afterwards is what is being listened for. What you learned keeps it from sounding rehearsed.
Next → 9 / 25 -
Q10 / 25
You are stuck halfway through a problem and the silence is getting long. What is the productive move?
- AKeep working quietly until something breaks the deadlock, to avoid appearing lost.
- BReduce the problem, say what is still unresolved, and work through a small example.
- CAsk for the answer to the part you are stuck on, so the round can continue on time.
- DSwitch to a different approach immediately, since the first one is clearly not working.
Show the answer
A small example isolates where the reasoning stops working. Say what you still need to establish, run the example by hand, and say what its result rules out. That turns a stall into visible problem solving, and it often hands you the general case as a by-product.
Next → 10 / 25 -
Halfway, at your pace
In the app the mock exam is timed and scored like the real thing.
-
Q11 / 25
A salesperson moves from East to West on 1 July. June sales must still report under East, and another report must show the current region. Which design meets both?
- AVersion the salesperson with validity dates and match each fact to the version valid on its own date.
- BVersion the salesperson but point every fact at the newest version, so both reports agree.
- CKeep one row per salesperson and work the historical region out from the sale date at report time.
- DOverwrite the region on the salesperson row and add a region column to the fact table as well.
Show the answer
Type 2 versioning expires the old row, inserts a new one with its own surrogate key and validity dates, and the load process resolves each fact to the version valid on the fact date. The current view then comes from filtering to the current version. The price is extra rows and a dated lookup during load.
Next → 11 / 25 -
Q12 / 25
A pipeline you wrote last quarter runs nightly without failures, but nobody else on the team can safely change it. How does that measure against the role?
- AIt meets the role in full, because a pipeline that runs every night without failures is the whole deliverable.
- BIt falls outside the role, because scheduled pipelines are not data engineering work.
- CIt cannot be judged until the pipeline breaks and someone measures the recovery time.
- DRole expectations include building maintainable and reusable data products as well as making pipelines run.
Show the answer
Running is the floor, not the bar. The role asks for repeatable, reliable and reusable solutions, so work that only its author can change is an unfinished deliverable even while the schedule stays green, because the next requirement arrives with a bottleneck attached.
Next → 12 / 25 -
Q13 / 25
A deletion request covers records held in the raw landing zone, in two derived tables and in last month's backup. Two teams read the scope differently. What settles it?
- AThe engineer handling the request, who should choose the broadest deletion to stay safe.
- BThe backup retention setting, since anything held inside a backup is out of scope already.
- CThe team that owns the raw zone, since deleting at the source removes it everywhere downstream.
- DThe internal compliance process, which decides the scope instead of each team's reading.
Show the answer
This is a compliance question with a defined internal route, and the point of that route is that the answer does not change with whoever picks up the ticket. Engineering supplies where the copies live; the process supplies what has to happen to each copy and by when.
Next → 13 / 25 -
Q14 / 25
A nightly job appends the day's rows to a table. It failed after writing, was retried, and the table now holds that day twice. Which property was missing?
- AA unique constraint upstream, so that the same record cannot be produced twice.
- BTransactional reads, so that a consumer never sees a half-written batch of rows.
- CIdempotent writes make repeated processing converge on the same intended result.
- DA longer retry delay, so the first write has finished before the second one starts.
Show the answer
A retry has to be able to repeat a write without changing the outcome a second time. A plain append cannot, because nothing tells it this batch already landed. Replacing the day's partition, or merging on a key, turns the second attempt into a no-op instead of a duplicate.
Next → 14 / 25 -
Q15 / 25
You need exactly one latest event per user. Timestamps can tie, event_id is unique and non-null, and the largest id must win a tie. Which window expression puts the wanted row first?
- AROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_time DESC)
- BRANK() OVER (PARTITION BY user_id ORDER BY event_time DESC)
- CROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_id DESC, event_time ASC)
- DROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_time DESC, event_id DESC)
Show the answer
Rows that tie on the ordering columns are peers, and the ranking functions hand peers the same answer. Adding a unique column to the window order removes the tie, so exactly one row per user carries number 1. How the final output is sorted stays a separate decision.
Next → 15 / 25 -
Q16 / 25
A task works out its cut-off from the current clock time inside the task body. The task is retried an hour later. What happens?
- AThe retry fails at once, because a task is not permitted to read the system clock.
- BThe re-run produces a different outcome, although a task should give the same result on every attempt.
- CNothing changes, because the retry inherits the clock value from the first attempt.
- DThe result is identical, provided the retry happens inside the same scheduling interval.
Show the answer
A retry is expected to reproduce what the first attempt produced. Reading the clock inside the task makes the output depend on when the attempt ran, so the second run quietly covers a different window. Take the boundary from the run's own interval and the retry lands on the same data.
Next → 16 / 25 -
Q17 / 25
You have finished a transformation and have a few minutes to test it. Which set of inputs earns those minutes?
- AAn ordinary case plus empty input, duplicates, nulls, the boundaries, and a malformed record.
- BThe largest realistic input, since anything that survives that will survive the rest.
- CTen variations of the ordinary case, since repetition exposes intermittent behaviour.
- DWhichever input the interviewer supplied, since it was chosen to represent the task.
Show the answer
Each of those inputs breaks a different assumption: no rows at all, two rows that should have been one, a missing value, the first and last element of a range, and a row that does not parse. The ordinary case only confirms the path you already had in mind while writing the code.
Next → 17 / 25 -
Q18 / 25
You finish a project story well and have a moment left. What ending adds the most?
- AA summary of the project's headline result, so the strongest number is the last thing heard.
- BAn offer to go deeper into any part of the architecture if there is time remaining.
- CAn acknowledgement of the colleagues who made the outcome possible alongside you.
- DA lesson that changed a later design, review, test, or operational practice of yours.
Show the answer
A lesson you can point at in later work is evidence that you change; a lesson stated in the abstract is a sentence. Name what you did differently the next time, and the story stops being one incident and becomes how you operate.
Next → 18 / 25 -
Q19 / 25
You spend eight silent minutes working out an approach, then explain the finished plan in one go. What did the silence cost?
- AThe assumptions and trade-offs at each decision point, which are the things being scored.
- BNothing, provided the plan you present turns out to be the correct one in the end.
- CThe interviewer's attention, since a long pause makes a candidate appear unprepared.
- DThe chance to finish the implementation, since those eight minutes could have been spent coding.
Show the answer
Interviewers want to see how you break a problem down, and a finished plan hides that entirely. Say what you are weighing while you weigh it: the option you are discarding, the reason, the assumption you are making. A correction at minute two is cheap, and at minute twenty it is not.
Next → 19 / 25 -
Q20 / 25
Products roll up into subcategories and subcategories into categories, held as three tables in a Power BI semantic model. Report authors want one drill-down hierarchy. Which model serves that?
- AKeep the three tables, because the shorter filter chains make the model faster to query.
- BSplit the product dimension further, because more tables give report authors more choice.
- CKeep the three tables, because a hierarchy is built from the relationships between them.
- DCombine the three into one dimension, because a Power BI hierarchy cannot span more than one table.
Show the answer
In a Power BI semantic model, a drill-down hierarchy is defined over columns of a single table, so the three levels have to sit together for it to exist at all. The price is category and subcategory values repeated on every product row, which is usually cheaper than the hierarchy you cannot build.
Next → 20 / 25 -
Q21 / 25
A design round opens with one line: load orders into a warehouse. Nothing else is stated. How should you spend the first minutes?
- AHold back questions about freshness and budget until the diagram is finished, to save time.
- BDraw the architecture you know best, then adjust it if the interviewer objects.
- CClarifying throughput, latency, correctness, retention, and cost prevents an underspecified design answer.
- DAsk for the expected row count and nothing more, since volume settles the rest of the design.
Show the answer
Clarify the requirements before you commit to a shape. Ask how much data arrives, how soon results are needed, what makes a row correct, how long it is kept and what it may cost. Each answer rules out designs, and an assumption you state out loud can be corrected before it costs you the round.
Next → 21 / 25 -
Q22 / 25
A team plans to change a source field that several downstream datasets read. What should it inspect first to judge the impact?
- AThe query logs of the past week, to see which reports touched the field recently.
- BThe metadata repository entries that describe the affected data flows.
- CThe storage cost report, to see which downstream datasets are large enough to matter.
- DThe source system release notes, to see whether the field was described as stable.
Show the answer
A metadata repository exists to answer exactly this: which flows and which systems integrate with this field. Reading it before the change hands you the list of things to notify or fix, instead of learning it from whichever consumer breaks first.
Next → 22 / 25 -
Q23 / 25
A streaming job is killed mid-run and restarted from the same code. What decides whether it resumes where it stopped instead of reprocessing everything?
- AThe sink, which reports the last row it accepted when the query asks it on startup.
- BThe scheduler, which records the last successful run time and passes it to the new run.
- CThe source, which keeps a cursor for each client that survives a client restart.
- DCheckpointing preserves progress and state needed to recover a streaming query.
Show the answer
The checkpoint directory holds the offsets already processed and the state the query had built. On restart the query reads it, resumes from those offsets and keeps its aggregation state. Give each query its own checkpoint directory in durable storage, or two queries will overwrite each other's progress.
Next → 23 / 25 -
Q24 / 25
A table is partitioned by month and a query asks for a single month. Why can that run faster than the same query over one unpartitioned table?
- APartitioning caches the most recent month in memory, so a repeat query never touches the disk.
- BPartition pruning and selective predicates can reduce the data scanned by a query.
- CPartitioning sorts the whole table globally, so the engine stops reading once it finds a match.
- DPartitioning compresses each partition, so the same rows take up fewer bytes on disk than before.
Show the answer
When the filter names the partitioning column, the planner can prove that whole partitions hold no matching row and skip them before a single page is read. The saving comes from what is never touched, which is why a filter on any other column buys none of it.
Next → 24 / 25 -
Q25 / 25
A task downloads a file to the local disk and the next task reads it from there. It works on a laptop and fails in production. Why?
- AThe production scheduler clears temporary directories between tasks as part of its cleanup.
- BThe second task ran before the first one, because production ignores the declared order.
- CDownloads are blocked in production, so the first task never wrote the file in the first place.
- DTasks run on different servers, so a file on the local filesystem may not be there for the next task.
Show the answer
With a distributed executor each task can land on a different worker, and nothing promises the second one sees the first one's disk. Pass a small value through the metadata channel between tasks, or write the payload to shared remote storage and pass the path along.
Next → 25 / 25 -
That’s the whole mock exam
Every question you miss comes back exactly when you’re about to forget it.
How to use this mock exam
Sit all 25 questions in one go: the mix covers every domain in the same proportion as the exam, so a low score points at the domain you skipped rather than at bad luck.
Read the explanation under every question, including the ones you got right: the reason an option is wrong is usually the thing being tested.
Then retake it in the app, where the mock exam is timed and scored and the questions you miss come back on a schedule.
