The Data Engineer Live Coding Interview

A data engineer live coding interview is a SQL or Python coding challenge solved in a shared editor while an engineer watches, usually in a 1 hour slot. It's scored on how you frame and explain the solution, and whether you test it, as much as on whether the results are right, so the round rewards a steady rhythm: restate, plan out loud, code, test on a sample, then discuss complexity.

Last updated: Proudly published by: Jeff Wahl14 min read

What is a live coding interview for data engineers?

A live coding interview is a coding challenge solved in a shared editor, usually in a 1 hour slot, while an engineer watches and takes notes and puts questions to you as you go. For data engineers the problem is almost always SQL against a described schema or Python that reshapes records, rarely an algorithm puzzle, and the interviewer scores how you get to the answer as closely as the answer itself.

It shows up twice in most loops: once as the technical screen, and again at the onsite inside the SQL round and the Python round. The editor is a browser pad such as CoderPad that runs code and shows the results, so the interviewer watches every run as it happens, errors and fixes included.

That visibility is what makes the round different from practice at home. Nobody sees the 3 wrong queries you tried before the right one when you practise alone. In a live round they see all of them, and a wrong first attempt that you catch and fix while explaining it reads as engineering, while a right answer typed in silence reads as a guess.

Live coding vs online coding challenge vs take-home

Live coding round
  • Who watchesAn engineer, live
  • Length1 interview slot
  • Runs your codeYes, in the pad
  • Decided byReasoning and code
  • Talking out loudExpected throughout
  • AI assistantsOnly if enabled
Online coding challenge
  • Who watchesNobody, auto-scored
  • LengthFixed timed window
  • Runs your codeYes, hidden tests
  • Decided byTests passed
  • Talking out loudNot part of it
  • AI assistantsUsually barred
Take-home assignment
  • Who watchesA reviewer, later
  • LengthHours, over days
  • Runs your codeReviewer runs it
  • Decided byCode and README
  • Talking out loudIn the debrief
  • AI assistantsSet by the brief

What interviewers score in a live coding round

Employers rarely publish their rubric, but the ones that do describe the same things. The Databricks engineering interview guide says its coding interview "evaluates your ability to write production-quality code", with "clean code organization, comprehensive test coverage, and careful edge case handling", and an analysis of efficiency in Big-O notation. Correctness is 1 line of that list.

In practice the notes an interviewer writes fall into 4 groups. Framing: did you restate the problem, ask about the grain and the time zone, check for nulls and duplicates, and state your assumptions? Correctness: does the code return the right result on the stated input and on the edge cases you named? Verification: did you run it on a small sample and check the output against what you expected before calling it done? Communication: could the interviewer follow your reasoning without asking, and did you take a hint when it was offered?

The 4 groups explain why 2 candidates with the same final query can get different outcomes. The one who asked whether retries can repeat an event and planned a dedupe, then ran the query and checked 1 group by hand, showed 4 things. The one who typed the same query in silence showed 1, and left the interviewer guessing whether it was luck.

Prepare for the interview
01 / Open invite
02min.

Know Live coding interview the way the interviewer who asks it knows it.

a Live coding interview query, the same shape a screen would give you.
The diff against expected. Where ties broke. What you missed.
sandbox
1SELECT user_id,
2 COUNT(*) AS sessions
3FROM events
4WHERE ts >= NOW() - INTERVAL '7 day'
5
Execute your solution0.4s avg.
Capital OneInterview question
Solve a Live coding interview problem

How to pace a 45 minute live coding round

A 45 minute round gives the code about 20 minutes, 44% of the time. The first 3 go to introductions and reading the prompt. Then spend 3 restating the problem in your own words and asking what the output grain is, what counts as a duplicate, and which time zone "daily" means, and 4 more saying the plan out loud: the tables or data structures, the order of steps, the complexity. By minute 10 the interviewer has agreed to the plan or corrected it, before a line of code depends on it.

Write the simplest version that works, narrating each non-obvious line. Then give 7 minutes to testing: run it on the sample, check 1 group by hand, and try the empty input and the duplicate. The last 8 minutes are for complexity, what changes at 100 times the data, and your own questions.

A 45 minute live coding round as 7 phases in order: intro 3 min, clarify 3, plan 4, code 20, test 7, complexity and scale 5, and the candidate's questions 3A 45 minute live coding round as 7 phases in order: intro 3 min, clarify 3, plan 4, code 20, test 7, complexity and scale 5, and the candidate's questions 3

The 14 minutes spent clarifying and planning up front, plus the testing at the end, are the ones candidates cut when they feel behind, and they are the minutes that separate a pass from a rejection. A plan corrected at minute 10 costs nothing; the same correction at minute 30 costs the rewrite.

How to think out loud without stalling

Silence is the failure interviewers mention most, because a silent candidate gives them nothing to write down. You do not need to narrate every keystroke. You need to keep the interviewer's picture of your plan current, so they know where you're and can steer you before you spend 10 minutes on a dead end.

Keep silences short, and name them when you need one: I'm going to think about the join for 20 seconds. The interviewer will wait. When you are stuck, describe the problem you're stuck on, not the fact that you're stuck: I need the latest row per user, and I am deciding between a window function and a self-join. That sentence invites a hint without asking for one, and a hint taken while you're clearly reasoning costs far less than one given after a long silence.

While you type, say what each block is for as you start it, not after: now I dedupe on event_id so retries count once. Practise this before the day. Talking while you code is its own skill. Record yourself solving 1 problem out loud, then play it back and note each gap longer than about 15 seconds.

Why a live coding round feels harder than practice

Being watched changes the result, and there's a controlled study to show it. In Does Stress Impact Technical Interview Performance?, presented at ESEC/FSE 2020, researchers at NC State University and Microsoft gave 48 participants the same string problem with a 30 minute limit. 22 solved it alone in a closed room; the other 26 solved it on a whiteboard while thinking aloud in front of an experimenter, the format of a traditional technical interview.

Alone, 14 of 22 passed all 3 test cases, 64%. Watched, 10 of 26 did, 38%, and the median score fell from 3 of 3 to 1. Participants in the watched group described the start of the task as the hardest part, and many skipped tracing their code through a test case, the step that catches bugs.

Share of participants who passed all tests on the same coding problem: 64% (14 of 22) when solving alone vs 38% (10 of 26) when watchedShare of participants who passed all tests on the same coding problem: 64% (14 of 22) when solving alone vs 38% (10 of 26) when watched

For preparation, that means practising the format as well as the problems. Solving 100 problems alone trains the private skill. A handful of sessions with someone watching, or a recorded run with a timer, trains the one the round measures, and the pacing plan gives you a script for the opening minutes that the study found hardest.

Where the Exports Land

> Export jobs have been flaky lately, so for every batch job whose name contains 'export', count how many landed in each completion status.

A live SQL coding problem, worked the way interviewers want it

The most common data engineering live round is SQL against a described schema, and correctness is rarely what decides it. Take a typical prompt: from play_events, count streams per country per day, along with distinct streamers. Each row has 4 columns: event_id, user_id, country and event_ts.

A strong answer starts with 3 questions. Can the same event arrive twice? Here yes: the client retries a failed send with the same event_id, so 11 rows arrive for 7 real streams. Is a streamer counted once per day even with several plays? Yes. Which time zone is a day? Say UTC and note it, because 2 of the 7 streams start within 15 minutes of midnight and would change day in another zone.

Then the query follows from the answers: COUNT(DISTINCT event_id) counts streams and COUNT(DISTINCT user_id) counts streamers, with the query grouped by country and DATE(event_ts). Check 1 group by hand before calling it done. Germany on the first day receives 4 rows, but they are 2 streams by 2 people; a COUNT(*) would have reported 4 streams and doubled the number. The United States on the same day shows why streams and streamers differ: 3 streams by 2 people, because 1 person played twice.

The weak answer to the same prompt jumps to COUNT(*) grouped by country, never asks about retries, and never runs a sample. It returns numbers, and they're wrong in a way the interviewer spotted before the query finished. Finish by naming what changes at scale: at billions of rows, pre-aggregate per day in the pipeline and partition the table by event date so the query reads 1 day at a time.

Run the retry-safe streams query

-- 1 row per country per UTC day
-- streams: distinct event_id, so a retried send counts once
-- streamers: distinct user_id, so 2 plays by 1 person count once
SELECT
  country,
  DATE(event_ts) AS event_date,
  COUNT(*) AS rows_received,
  COUNT(DISTINCT event_id) AS streams,
  COUNT(DISTINCT user_id) AS streamers
FROM play_events
GROUP BY country, DATE(event_ts)
ORDER BY event_date, country;

11 rows load for 7 real streams. Compare rows_received with streams in each group, then remove DISTINCT from the streams column to see the retries inflate it.

Python live coding problems: data wrangling, not puzzles

The Python half of a data engineering live round looks like the work. You parse lines of a log into records and dedupe them on a key, keeping the latest, before you group and count. Other prompts have you sessionize events by a gap in time or flatten nested JSON, and merging 2 sorted feeds comes up too. The input is a list of dictionaries or a few lines of text, and the expected answer uses the standard library. Ask whether pandas is available before you reach for it; many interviewers want to see the loop and the dictionary.

The traps are the ones production code has. itertools.groupby only groups consecutive items, and the Python documentation warns that the input generally needs to be sorted on the same key first, unlike SQL's GROUP BY. Timestamps arrive as strings in mixed formats. Records are missing keys, so dict.get with a default beats indexing. A generator that reads 1 line at a time answers the follow-up about a 50 GB file before it's asked.

Write a small function per step, name each after what it returns, and run each on 3 hand-made records before combining them. The Python interview questions cover the shapes these problems take, and the Python practice problems run them in a browser editor with the same constraints as a live pad.

Live coding problems data engineers are asked

SQL

Keep only the latest version of each customer record from a table that receives updates

Rank rows within each customer by the update timestamp with ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY updated_at DESC) and keep rank 1. Ask first what breaks a tie when 2 updates share a timestamp, and add a second ORDER BY column such as the load id so the result is deterministic.

SQL

Find users who were active on 3 or more consecutive days

Reduce to 1 row per user per day, number each user's days with ROW_NUMBER(), and subtract that number in days from the date. Consecutive days share the same difference, so grouping by user and that difference and keeping groups of 3 or more returns the streaks. Say that duplicates must be removed first or the numbering breaks.

SQL

Compute a 7 day rolling sum of revenue per store, including days with no sales

Build a calendar of every store and day, left join the daily revenue to it with COALESCE to 0, then take SUM() OVER (PARTITION BY store_id ORDER BY day ROWS BETWEEN 6 PRECEDING AND CURRENT ROW). Without the calendar a gap day silently widens the window to more than 7 days.

Python

Given a list of click events with a user id and a timestamp, split each user's clicks into sessions separated by 30 minutes of inactivity

Sort by user and timestamp, walk the list once, and start a new session when the user changes or the gap to the previous click exceeds 30 minutes. It is O(n log n) for the sort and O(n) after it. Ask whether the input is already sorted and whether a gap of exactly 30 minutes starts a new session.

Python

Parse web server log lines and return the 5 paths with the most 5xx responses

Read the file line by line and pull out the path and status with a split or a compiled regular expression. Skip malformed lines but keep a count of them, and add each 5xx path to a collections.Counter. Counter.most_common(5) returns the answer. Mention that reading line by line keeps memory flat for a file of any size.

Python

Merge 2 lists of records that share an id into 1 record per id, where the second list wins on conflicts

Index the first list into a dictionary keyed by id, then update each entry from the second list, adding ids that were missing. It is linear in the total number of records. Ask what should happen to ids that appear only in 1 list and to fields that are null in the second list, since null may mean unknown rather than cleared.

Mistakes that sink fluent coders, and how to recover

The costliest mistake belongs to confident candidates: they start typing as soon as they hear the prompt and find out 10 minutes later that the approach can't work. The cure is the plan out loud, which takes a few minutes and lets the interviewer stop you early. Close behind it is skipping the restatement, which leads to solving a nearby problem: the latest order per user when the prompt asked for the latest order overall.

Candidates also declare victory without running a sample. The pad runs code, and a result you'ven't looked at is a result you cannot defend. Another common mistake is defending a wrong answer. When the interviewer asks whether your query handles a user with no orders, trace it out loud; if it does not, say so before you fix it. Interviewers write down how you take feedback, and the defensive version of a candidate is the one they remember.

If you realise mid-round that the approach is wrong, stop typing and say what breaks: the running total double counts retries, so I need to dedupe first. Propose the new plan, wait until the interviewer agrees to it, and rewrite from it. A clean restart with 15 minutes left can still pass. Patching a design that can't work, while the clock runs, rarely does.

AI-assisted live coding rounds, and what the pad records

Assume the AI assistant is off unless the recruiter or interviewer says otherwise. Interview platforms now ship one: CoderPad's AI Assist, for example, is a setting the interviewer switches on per pad, with modes that answer questions and draft plans as well as edit code, and its documentation states that every prompt and every AI response is saved for review in playback. Where an employer enables it, the assistant is part of what's scored, not a shortcut around it.

When the assistant is on, the round tests judgment instead of typing. Break the task down and prompt for 1 piece at a time, read every line it returns before running it, test the output on the edge cases you named during clarification, and say out loud which lines you accepted and why you changed the others. Accepting code you cannot explain reads the same in the transcript as it would in a code review. The AI coding interview questions cover how these rounds are run and scored.

When the assistant is off, remember what the pad records whatever its settings. CoderPad's playback keeps every keystroke and every run, and it flags pasting from an outside source and leaving the editor tab. A block of finished code that appears in 1 paste after 2 minutes of silence shows up in the playback, so the interviewer can see it afterwards even if they missed it live.

The Databricks live coding interview

Databricks is 1 of the few employers that publishes how its engineering interviews run. Its engineering interview guide lists a 1 hour technical screen, then a full panel of 4 to 6 interviews of 1 hour each, and points candidates to the CoderPad sandbox to prepare, so the live coding happens in CoderPad. The guide says Databricks is language agnostic but expects fluency in the language you choose.

The coding interview is scored on production-quality code, meaning clean organisation and tests that cover the edge cases, and on a Big-O analysis of the solution. That favours candidates who write a small function, test it on the spot and name its complexity without being asked. Expect the Spark conversation elsewhere in the loop: the panel also covers architecture, drawn in CoderPad Draw, and a detailed walk through your own past work. The published guide covers software engineering roles, so ask your recruiter which of these interviews a data engineering loop includes. The Databricks interview questions cover the Spark and Delta Lake topics those conversations reach.

Databricks coding interview at a glance

Editor
CoderPad, with the CoderPad sandbox suggested for practice
Technical screen
1 hour
Full panel
4 to 6 interviews of 1 hour each
Language
Your choice, with fluency expected in it
Coding interview scores
Production-quality code with tests that cover edge cases, plus Big-O
Architecture interview
A whiteboard in CoderPad Draw
Format
Virtual unless the recruiter says otherwise

How to practise for a live coding round

Split preparation into 2 tracks. The first is the patterns: window-function dedupes and gaps and islands, rolling windows and anti-joins, plus sessionizing and the parse-then-count task. Work through the SQL interview questions and the SQL practice problems until each pattern comes out without searching for syntax, and do the same for Python.

The second track is the format, and most candidates skip it. Take 1 problem a day under the live conditions: a 45 minute timer, a plain browser editor with autocomplete off, and your voice on. Restate and plan before you code, then test and discuss, in the same order every time, so the rhythm holds when nerves arrive. The in-browser coding interview practice sets up exactly that environment.

In the last 2 weeks, add sessions where someone watches. A colleague who has interviewed people works best; a data engineer mock interview with follow-up questions is the next best thing. If your loop leans on a take-home instead, the take-home assignment guide covers that format, and the data engineer interview prep guide places the live round among the others you'll sit.

Live coding interview FAQ

What platform should I practise live coding on?+
Practise in a plain browser editor that runs code, because that's what most live rounds use: CoderPad, HackerRank's interview pads and similar tools. Open the vendor's free sandbox once before the day so you have used the run button and seen where the console and the database tab sit, and do some sessions with autocomplete off.
How long should I take per problem in a live coding interview?+
In a 45 minute round with 1 problem, aim to agree a plan by minute 10 and have a first working version by about minute 30. If 10 minutes of coding pass without progress, say where you are stuck and ask whether the direction is right. Asking costs little; ending the round with nothing that runs costs the round.
What if I forget syntax during the round?+
Say so and keep moving: name the function you want and what it does, write it the way you believe it works, and mark the line to check. Most interviewers will supply the argument order. Writing confident but wrong code without flagging it's worse than admitting the gap.
What if my first solution works but is inefficient?+
Finish it, then name its complexity and the better approach: this is quadratic because of the nested loop, and a dictionary keyed by user makes it linear. Ask whether to refactor or move on. Naming the trade-off earns credit even when there's no time left to rewrite.
What if I don't know the language the company uses?+
Use the one you're fastest and most accurate in, unless the recruiter names one. Most data engineering loops accept Python for general coding and expect SQL for query problems, and Databricks states in its own interview guide that it's language agnostic but expects fluency in the language you choose.
How do I practise talking while coding?+
Solve 1 problem a day out loud with a timer and record it. On playback, note every silence longer than about 15 seconds and every line you typed without saying why. After a few sessions the narration stops competing with the thinking, and a session with a colleague watching is the final test.
How do I recover from a wrong approach mid-round?+
Stop typing and say what breaks. Before touching the code, propose the new approach: the running total double counts retries, so I will dedupe on event_id first. Then rewrite from the plan. A clean restart with 15 minutes left beats patching a design that cannot work.
What if the interviewer is quiet or unfriendly?+
Some interviewers say little on purpose so the candidate drives. Keep your rhythm of restate, plan, code and test, and at each step check in with a direct question. A quiet interviewer is still taking notes on what you say, so keep saying it.
02 / Why practice

The candidate who gets the offer

  1. 01

    Reading a solution is not the same as writing one

    Every engineer who has frozen on a query they had read a dozen times knows the gap. The only preparation that closes it is producing the answer yourself, under time, before the interview does it for you

  2. 02

    76% of hiring managers reject on the coding task, not the resume

    From HackerRank's 2024 Developer Skills Report. Candidates who look strong on paper still fail the live screen if they haven't done timed, executable practice

  3. 03

    5 problem shapes cover 80% of data engineer loops

    Dedup, sessionization, top-N-per-group, slowly-changing dimensions, partition tricks. Writing the shapes by hand turns the unfamiliar into pattern recognition

Related guides