Data engineer interview questions: SQL, pipelines, and modeling

The data engineer interview questions you are most likely to face, grouped by SQL, data modeling, pipelines, Spark, streaming, and cloud, with how to answer each.

6 min read Interviews editorial team

  • data engineering
  • sql
  • interview prep
On this page
  1. The usual interview loop
  2. SQL questions
  3. Data modeling questions
  4. Pipeline and ETL design questions
  5. Spark and distributed processing
  6. Streaming questions
  7. Cloud and warehouse questions
  8. Python and coding questions
  9. Behavioral questions specific to data engineering
  10. A two-week study plan
  11. FAQ
  12. Find the right data role

Data engineering interviews look different from general software interviews. There is usually less focus on tricky algorithms and more on SQL, data modeling, pipeline design, and how you keep data correct when systems fail. This guide groups the most common questions by topic and explains what a strong answer includes.

The usual interview loop

Most data engineering loops include some combination of:

  1. A recruiter or hiring manager screen.
  2. A SQL round, live or as an online test.
  3. A Python or general coding round, often data manipulation rather than puzzles.
  4. A data modeling or pipeline design round.
  5. A behavioral round about past projects and incidents.

Ask the recruiter which stages apply. If there is no algorithms round, spend that time on SQL and design.

SQL questions

SQL is the most consistent part of data engineering interviews. Expect to write queries by hand.

Common question types

  • Aggregation with filters: total revenue per customer for the last 30 days, excluding refunds.
  • Joins: find customers who placed an order but never logged in, or products never ordered.
  • Window functions: rank products by sales within each category, running totals, moving averages.
  • Top N per group: the three most recent orders per customer.
  • Deduplication: keep the latest record per key when duplicates arrive.
  • Gaps and islands: find consecutive login days or periods of activity.
  • Date handling: monthly cohorts, week over week change, time zone issues.

What a strong answer includes

  • Clarify the grain of each table before writing anything. "Is this one row per order or per order item?"
  • Handle nulls and duplicates explicitly.
  • Prefer window functions over correlated subqueries when they are clearer.
  • Talk about performance: indexes, partitions, and avoiding scans of huge tables.

Example

"Return the latest status for each order from an order_events table."

SELECT order_id, status, event_time
FROM (
  SELECT order_id, status, event_time,
         ROW_NUMBER() OVER (PARTITION BY order_id ORDER BY event_time DESC) AS rn
  FROM order_events
) ranked
WHERE rn = 1;

Then mention what happens if two events share the same timestamp, and how you would break the tie.

Data modeling questions

  • What is the difference between a fact table and a dimension table?
  • Explain star schema versus snowflake schema, and when you would choose each.
  • How do you handle slowly changing dimensions? Describe type 1 and type 2.
  • How would you model orders, order items, products, and customers for analytics?
  • When would you denormalize, and what does it cost?
  • What does the grain of a fact table mean, and why does it matter?

How to answer: draw tables, name the keys, state the grain, and walk through one query the business would run. Mention how the model handles late arriving data and changes to dimensions.

Pipeline and ETL design questions

  • Design a pipeline that ingests events from an application and makes them available for reporting by the next morning.
  • How do you make a pipeline idempotent?
  • How do you backfill a year of data without affecting daily runs?
  • How do you detect and handle bad or missing data?
  • Batch versus streaming: when is each the right choice?
  • What is the difference between ETL and ELT, and why has ELT become common with cloud warehouses?

What interviewers listen for

  • Idempotency: rerunning a job produces the same result. Use partition overwrites or merge statements rather than blind appends.
  • Data quality checks: row counts, null checks, uniqueness, and freshness, with alerts.
  • Orchestration: how tasks depend on each other, retries, and alerting. Tools such as Airflow, Dagster, or Prefect are common examples.
  • Schema changes: how you handle a new column or a type change from upstream.
  • Cost and performance: partitioning, file formats such as Parquet, and avoiding small files.

Spark and distributed processing

If the posting mentions Spark, expect questions such as:

  • What is the difference between a transformation and an action?
  • What causes a shuffle, and why is it expensive?
  • How do you handle data skew in a join?
  • When would you use a broadcast join?
  • How do partitions and file sizes affect performance?
  • What is the difference between narrow and wide dependencies?

Have one real or practice example of a slow job you made faster and what you changed.

Streaming questions

  • What is the difference between event time and processing time?
  • How do you handle late events in a streaming pipeline?
  • What does exactly-once processing mean, and how do systems approximate it?
  • How do Kafka partitions and consumer groups work?
  • How would you build a real-time dashboard of orders per minute?

Cloud and warehouse questions

  • Compare the warehouses you have used, for example BigQuery, Snowflake, Redshift, or Databricks, including how they charge.
  • How do you control cost in a cloud warehouse?
  • How do you manage access to sensitive data, such as personal information?
  • What is a data lake, a warehouse, and a lakehouse, and how do they differ?

Python and coding questions

Data engineering coding rounds usually involve practical tasks:

  • Parse a large log file and count events per user without loading it all into memory.
  • Merge two sorted files.
  • Write a function that deduplicates records by key, keeping the newest.
  • Transform nested JSON into flat rows.

Write clean code, handle edge cases, and talk about memory use for large inputs.

Behavioral questions specific to data engineering

  • Tell me about a time data was wrong in a report. How did you find and fix it?
  • How do you work with analysts and data scientists who depend on your tables?
  • Describe a pipeline you built from scratch. What would you change now?
  • How did you handle a request for data that would have been expensive or risky to provide?

Use the STAR method and focus on how you protected data correctness and trust.

A two-week study plan

Days Focus
1 to 4 SQL practice: joins, windows, top N, deduplication, gaps and islands
5 to 6 Data modeling: star schemas, slowly changing dimensions, one model end to end
7 to 9 Pipeline design: idempotency, backfills, data quality, orchestration
10 to 11 Spark and streaming concepts relevant to the posting
12 Python data manipulation practice
13 Project stories and behavioral answers
14 Review and rest

For free practice material, see our list of GitHub repositories for data engineering interview questions.

FAQ

How much SQL do I need for a data engineer interview?

A lot. You should be comfortable writing joins, aggregations, window functions, and common table expressions by hand, and explaining how a query would perform on a large table.

Do data engineer interviews include LeetCode style questions?

Some do, especially at large tech companies, but many focus on practical data tasks. Ask the recruiter, and if algorithms are included, review the common coding interview patterns.

What projects help for a data engineering interview?

A pipeline that ingests real public data, transforms it with tests, and loads it into a warehouse or database is a good example. Be ready to explain the design choices and what you would do at larger scale.

Find the right data role

Interviews lists data analyst jobs, Python jobs, and backend jobs that include data engineering work. When an interview is booked, the prep plan builds quizzes for that company's stack. Create a free profile to start.