FAANG Data Engineer Interview Questions
FAANG data engineer interviews run the same 5 rounds at Meta and Amazon as at Apple and Netflix, and Google follows the same plan: SQL and Python, data modeling and pipeline design, and behavior. The companies differ in what each round weights and which engine the interviewer thinks in, and this page gives the questions each loop asks with full answers.
What FAANG data engineer interviews ask
Meta and Amazon test data engineers on the same 5 things as Apple and Netflix, and Google does too: SQL and Python, data modeling and pipeline design, and behavior. What differs is the weight each round carries and the engine the interviewer thinks in, along with the framework behind the behavioral questions, so a candidate who clears 1 of these loops can still fail the next.
The SQL round is the constant. Every loop asks for window functions under time pressure: keep the latest row per key, rank the top N per group, compute a rolling metric, find a streak. The Python round stays close to data work, such as parsing records and grouping them with dictionaries before sorting, rather than graph algorithms. The modeling and design rounds are where the companies part ways, because each draws its prompts from the products it runs.
Every question here is asked in these loops. Each comes with the answer an interviewer wants to hear and the follow-up they use to tell a strong answer from a passing one, and the streak question is worked end to end in a query you can run.
How the 5 FAANG data engineer loops differ
| Company | What the loop weights | Engines you will hear about | Behavioral frame |
|---|---|---|---|
| Meta | Product sense tied to SQL and modeling: define the metric, then model and query it. | Presto and Spark over a Hive style warehouse. | Ownership and how you work through ambiguity with partners. |
| Amazon | Correct, clean SQL and scalable AWS designs, with every answer framed by the principles. | Redshift, S3, Glue, EMR, Kinesis and Athena. | The 16 Leadership Principles, told as STAR stories, with a Bar Raiser in the loop. |
| Apple | Depends on the team: warehouse architecture for services, operational pipelines for hardware. | Spark, with a mix of older Hadoop and Hive and newer warehouse stacks. | Direct technical depth and care with user data. |
| Netflix | Spark at scale, late-arriving events and pipelines you can rerun safely. | Spark, Iceberg, Kafka and S3. | The culture memo: candor, judgment and the keeper test. |
| Complexity reasoning in Python and analytics rigor in SQL and design. | BigQuery, Dataflow and Pub/Sub on Google Cloud. | Collaboration, leadership without authority and comfort with ambiguity. |
Meta data engineer interview questions
Meta's data engineering loop is built around product analytics. A typical onsite prompt starts from a product surface, such as a feed or an ad placement, sometimes a messaging feature, and asks which metrics tell the team whether it works. The same scenario then carries into the data model that records it and the SQL that computes the metrics, so the interviewer judges product sense together with modeling and SQL rather than in separate rounds.
The SQL leans on window functions for engagement: daily and weekly active users and retention cohorts, plus streaks of consecutive active days, which is the gaps and islands pattern. Queries run on Presto, the engine Meta built and described in the paper "Presto: SQL on Everything" as serving much of its SQL analytics workload, so standard ANSI SQL is the safe default.
Interviewers score how you reason as much as the query: whether you ask what counts as active before writing, name the grain of each table, and say what your metric would miss. The Meta data engineer interview questions go deeper on this loop.
Know FAANG data engineer interview the way the interviewer who asks it knows it.
Amazon data engineer interview questions
Amazon's loop is the most structured of the 5. Amazon's own interview guide describes 4 to 6 interviews of 45 to 60 minutes each, a debrief that judges the candidate against its 16 Leadership Principles, and a Bar Raiser: an interviewer from outside the hiring team who acts as an objective third party and helps drive the hire decision with the hiring manager.
The principles run through the technical rounds as well as the behavioral ones. Expect behavioral questions inside the technical interviews too, each aimed at a principle such as Customer Obsession or Dive Deep. Others target Bias for Action or Deliver Results. Answer in the STAR shape (situation, task, action, result), with 1 decision you owned and a number in the result. Prepare 8 to 10 stories and know which principles each one serves, because the same story told twice in a loop reads as a thin record.
The technical rounds reward correctness and clean code. SQL questions cover top N per group and deduplication, along with period over period revenue, and design questions assume AWS, with events on Kinesis and raw data in S3. Transforms run in Glue or EMR and load a Redshift warehouse. Know why a Redshift distribution key and sort key matter for a large join, and say what your design costs.
Google data engineer interview questions
Google weights reasoning about complexity more than the other 4. In the Python round, say what each choice costs in time and memory as you make it. A dictionary lookup beats a scan and a heap of size k handles a top k question, while a single pass is the answer when the input will not fit in memory. A correct answer with no complexity attached is a partial answer here.
The SQL and design questions assume Google Cloud: BigQuery for the warehouse, Pub/Sub for events and Dataflow for streaming and batch transforms. BigQuery questions often turn on cost, since on-demand queries are billed by the bytes they scan. A query that selects every column of an unpartitioned table reads all of it; selecting only the needed columns and filtering on the partition column cuts the bill before any other optimization.
Google also likes approximate answers at scale. Know that a HyperLogLog sketch counts distinct values in a small, fixed amount of memory with a known error, that sketches from separate days can be merged, and that BigQuery exposes them through its HLL_COUNT functions.
Netflix data engineer interview questions
Netflix runs its data platform on Spark over Apache Iceberg, the table format that began at Netflix, and its loop tests that stack directly. Expect a round in PySpark or Spark SQL, with questions on partitioning and skewed joins, including when a broadcast join helps, and design questions about playback and viewing events.
Late-arriving data is the recurring theme. A device can play a title offline and upload its events days later, so a daily aggregate that was correct on Monday is wrong by Thursday. A strong answer partitions by event time, reprocesses only the partitions that received late rows, and writes them with an overwrite or a merge so a rerun never double counts.
The behavioral round follows the Netflix culture memo, which describes the keeper test: a manager asks whether they would fight to keep a person who wanted to leave. Prepare stories where you disagreed openly and backed it with data, where you stopped work that was not paying off, and where you acted on your own judgment without waiting to be told.
High-Output Creators
> Which creators have published at least an hour of content in total (3,600 seconds), and what is each one's average duration per item, from the longest average down to the shortest? Items with no creator on record pool together as a single unattributed entry that is held to the same hour bar.
Apple data engineer interview questions
Apple hires data engineers into individual teams, and its loop varies more by team than any other on this list. Services and analytics teams ask warehouse questions: how to model usage and subscription data, how to handle slowly changing dimensions. Batch pipelines in Spark come up too. Hardware and operations teams ask about pipelines that feed manufacturing and supply chain analytics, where data arrives from many systems and correctness beats speed.
Privacy comes up across teams. When a design touches user data, say which identifiers you would keep out of analytics tables and where you would aggregate before storing. Also say who could read the raw events. Ask the recruiter which team the role sits in and prepare for that team's data. The SQL and Python rounds look like those at the other 4 companies, but the modeling and design prompts follow the team.
FAANG data engineer interview questions with answers
Keep only the latest record per user from a table that receives repeated updates.
Number the rows of each user with ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY updated_at DESC, update_id DESC) in a subquery and keep row 1. The second ORDER BY key is the part interviewers listen for: without a unique tiebreaker, 2 updates at the same timestamp make the result change between runs. RANK would keep both tied rows and leave a duplicate.
Return the top 3 products by revenue in each category, with ties.
Aggregate revenue per category and product first, then apply DENSE_RANK() OVER (PARTITION BY category ORDER BY revenue DESC) and keep ranks 1 to 3. Say why you chose DENSE_RANK: it keeps every product tied at a rank and still returns 3 distinct revenue levels, while ROW_NUMBER would drop a tied product arbitrarily and RANK would skip ranks after a tie.
Compute 7 day rolling distinct active users for each day.
COUNT(DISTINCT user_id) inside a window frame is rejected by PostgreSQL and many other engines, so the window shortcut fails. Build 1 row per user per active day, join each calendar day to the activity rows from the 6 days before it through that day, and COUNT(DISTINCT user_id) grouped by calendar day. At scale, mention that daily HyperLogLog sketches merged over 7 days give an approximate answer far cheaper.
Find each user's longest streak of consecutive login days.
Deduplicate to 1 row per user per day, subtract ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY login_date) from the date, and group by user and that difference: consecutive days share the same value, and each group's count is a streak length. Take the MAX per user. Deduplicating first matters, because a second login on the same day shifts every later row number and can merge 2 streaks across a gap.
Split playback events into sessions, where a gap of more than 30 minutes starts a new session.
Use LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time) to get the previous event, flag a row as a session start when there is no previous event or the gap exceeds 30 minutes, then take a running SUM of that flag over the same window as the session number. Group by user and session number to get each session's start and end, and its duration from those.
Given a stream of log lines, return the 10 most frequent error codes.
Parse each line, count codes in a dictionary or collections.Counter in 1 pass, then take the top 10 with a heap of size 10, which is O(n log 10) instead of sorting every distinct code. State the memory cost too: it grows with the number of distinct codes, not the number of lines, so the approach holds for a file far larger than memory.
Merge overlapping time intervals, such as a user's viewing sessions.
Sort the intervals by start, then walk them once, extending the current interval while the next one starts before it ends and emitting it when a gap appears. The sort makes it O(n log n) and the walk O(n). Ask whether touching intervals, where 1 ends exactly when the next starts, count as overlapping, since the answer changes 1 comparison.
Model the data behind a video streaming service's viewing analytics.
Pick the grain first: 1 row per playback session in a fact table, keyed by a session id, with foreign keys to the member and title dimensions and to device and date, and measures such as seconds watched and whether the title was completed. Keep title attributes that change, such as its genre tags, in the dimension with a history strategy, and add a daily member by title aggregate only once a query needs it.
Define and model an engaged user metric for a feed product.
Agree on the definition before the schema, for instance a user who viewed at least 5 posts and interacted with 1 in a day, and say what it rewards and misses. Then model an events fact at 1 row per event, a daily user activity table derived from it at 1 row per user per day with the counts the definition needs, and compute the metric from the daily table.
Design a pipeline for playback events arriving at hundreds of thousands per second, with events that can arrive days late.
Events land in Kafka partitioned by member id, a stream job writes them to an Iceberg table partitioned by event date, and daily Spark jobs build aggregates. Late events land in old partitions, so track which partitions changed and rebuild only those with an overwrite of each partition, which makes reruns idempotent. Cover failure cases such as a bad deploy or a skewed key, and say how consumers learn a day was restated.
Deduplicate notifications so each user gets at most 1 per piece of content per day.
Key a stream job by user and content id and keep state with a 24 hour time to live: drop the event if its key is already in state; if not, send it and record the key. Size the state from distinct keys per day, say where state lives (the stream engine's store or Redis) and what a restart does, and note that exactly once delivery also needs the sender to be idempotent.
Why does this warehouse query cost 10 times more than it should?
Look for a SELECT of every column in a columnar store, which reads columns nobody uses, a missing filter on the partition column, which scans every partition, and a join that multiplies rows before an aggregation. Fix the projection and add the partition filter, then aggregate before joining and compare bytes scanned before and after.
Tell me about a time you disagreed with a decision on your team.
Pick a disagreement about something that mattered, show how you made the case with data rather than opinion, and say what happened. If the decision went the other way, show that you committed to it fully. Amazon maps this to Have Backbone; Disagree and Commit, and Netflix listens for candor.
Tell me about a pipeline failure you owned.
Start with the failure and its impact in numbers and how it was detected. Then walk through what you did in the first hour and the root cause, and end on the check or design change you added so it could not recur. Interviewers score ownership of the fix and the follow-up more than the incident.
How to solve the login streak question
The longest streak of consecutive active days is the standard SQL question in engagement analytics, and it tests whether you know the gaps and islands trick. The difficulty is that SQL compares rows through windows, and a streak is defined by the absence of a gap, which no single row can see.
The trick turns the gap into a value. Number each user's login days in order with ROW_NUMBER(), then subtract the row number from the date. When the days are consecutive, both the date and the row number rise by 1 at each step, which keeps the difference constant. At a gap the date jumps while the row number rises by only 1, so the difference jumps too. User 7 logged in on days 1, 2, 3, 5, 6, 9, and day minus row number gives 0, 0, 0, 1, 1, 3.


Grouping by that difference returns 1 group per streak. Days 1 to 3 form a streak of 3 days and days 5 and 6 one of 2, while day 9 stands alone. The longest is 3. Deduplicate before numbering: a second login on day 3 would take its own row number and pull every later difference down by 1, which lands days 5 and 6 on the first streak's value and reports a streak of 5 days that never happened. On Presto or Trino, write the subtraction as date_add('day', -rn, login_date); on BigQuery, DATE_SUB(login_date, INTERVAL rn DAY).
Longest login streak per user in SQL
WITH days AS (
SELECT DISTINCT user_id, login_date
FROM logins
),
numbered AS (
SELECT
user_id,
login_date,
julianday(login_date)
- ROW_NUMBER() OVER (
PARTITION BY user_id
ORDER BY login_date
) AS streak_key
FROM days
),
streaks AS (
SELECT user_id, streak_key, COUNT(*) AS streak_days
FROM numbered
GROUP BY user_id, streak_key
)
SELECT user_id, MAX(streak_days) AS longest_streak
FROM streaks
GROUP BY user_id
ORDER BY user_id;User 7 has a repeated login on day 3; user 8 logged in on days 2 to 5. The query returns 3 and 4. Drop DISTINCT from the first step and user 7's answer becomes 5, a streak across a gap.
The data modeling round at FAANG companies
Every FAANG loop has a modeling question, and it almost always starts from a product rather than a list of entities: model viewing for a streaming service, orders for a marketplace, engagement for a feed. The interviewer wants to see you choose the grain before you choose the columns, since the grain decides which questions the model can answer and which it silently double counts.
Work in a fixed order. Name the questions the model must answer, pick the grain of the fact table, list the dimensions that describe each fact, then decide which attributes change over time and how you keep their history. Say which aggregates you would add for speed and why they wait until a query needs them. A star schema drawn cleanly and explained in that order is the answer these rounds reward.
A playback data model for a streaming service
1 row per playback session in fact_playback, with 4 dimensions. Completion and time watched are measures on the fact; a title's genre changes over time and lives in dim_title with its history.
The pipeline design round at FAANG companies
The design round asks you to move data from where it is produced to where it is used, at the scale the company runs. Events come from phones and servers and land in a stream or a batch landing zone. Transforms write them to a warehouse or lake table, and dashboards or models read from there. Draw that path first, then spend the time on what breaks it.
3 failure modes come up in nearly every FAANG design discussion. Late data changes results that were already published, so partition by event time and rebuild what changed. Reruns must not double count, so every write is an overwrite of a partition or a merge on a key. Hot keys, such as 1 viral title or 1 huge customer, skew a partition, so say how you would salt the key or split the work. Name the engine the company runs for each box, and state the freshness each consumer needs, since that decides whether the path is a stream or an hourly batch.
How to prepare for a FAANG data engineer interview
Start with the part every loop shares. SQL decides more FAANG loops than any other round, because it appears in the screen and again onsite, so get fast at the window function patterns: dedupe and top N, rolling metrics and streaks, sessions and period over period change. Work through the SQL interview questions for data engineers, then drill the same patterns against a clock with the SQL practice problems, where each query runs against hidden tests that catch the NULL and tie cases interviewers probe.
Once an onsite is scheduled, switch to the target company. Learn its engine's dialect, read about the products its design questions come from, and write behavioral stories in its frame: Leadership Principles for Amazon, the culture memo for Netflix, product ownership for Meta. Then rehearse the whole loop out loud, because the loop tests narration as much as code. A FAANG data engineer mock interview runs the rounds in order with a company's weighting, so the first time you explain a streak query under time pressure is not the real one.
FAANG data engineer interview FAQ
What questions are asked in a FAANG data engineer interview?+
How do FAANG data engineer loops differ from each other?+
Should I prepare for all 5 FAANG companies at once?+
Which FAANG company has the hardest data engineer interview?+
What is the Amazon Bar Raiser in a data engineer interview?+
What SQL dialect should I expect at each FAANG company?+
How long is a FAANG data engineer onsite?+
The candidate who gets the offer
- 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
- 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
- 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
SQL interview questions for data engineers
The SQL patterns every FAANG loop draws from, with answers
Data engineer interview questions
SQL, Python, modeling, pipeline and Spark questions from every round, answered
SQL practice problems
Window function problems that run against hidden tests
FAANG data engineer mock interview
A full loop with each company's weighting
Meta data engineer interview questions
Product sense and engagement SQL in Meta's onsite
The data engineering challenge
Dirty, production-shaped data, scored blind each week.