Data Engineer Interview Questions and Answers

Data engineer interview questions with answers: SQL, data modeling, ETL and ELT, batch and streaming, Spark, Kafka, orchestration, data quality, warehouses and lakehouses, and pipeline design.

Updated November 20, 2026 30 questions 7 min read

Key takeaways

  • Data engineering interviews test SQL, data modeling and pipeline design more than any single tool.
  • Expect questions on idempotent, re-runnable pipelines, late data and backfills.
  • Know the trade-offs of batch vs streaming, warehouse vs lakehouse and ETL vs ELT.
  • Senior roles add data quality, governance, cost and platform design.
Contents

Data engineering interviews test whether you can build reliable, scalable and cost-efficient pipelines: SQL and modeling, batch and streaming processing, orchestration and data quality. Below are 30 common questions grouped by topic and level.

What data engineer interviews cover

Typical topic mix in a data engineering interview loop

Editorial estimate; streaming-heavy roles shift weight toward Kafka and Flink.

4–5rounds
  • SQL and data modeling30%
  • Pipeline and system design25%
  • Coding (Python)20%
  • Distributed processing15%
  • Data quality and operations10%

Choosing an architecture

NeedTypical choice
Daily reporting on business dataELT into a warehouse, dbt models, orchestrator
Seconds-level metrics or alertsKafka + stream processing (Flink, Spark Structured Streaming)
Large raw and semi-structured dataLakehouse: object storage + Iceberg or Delta Lake
Replicating operational databasesChange data capture (Debezium) into the lake or warehouse
ML featuresFeature pipelines with point-in-time correctness

See also SQL, Python and data analyst interview questions.

SQL and data modeling

1What is a star schema?

Junior

A dimensional model with a central fact table of events or measurements (orders, clicks) and surrounding dimension tables with descriptive attributes (customer, product, date). It makes analytical queries simple and fast.

2What are slowly changing dimensions?

Mid

Ways to handle dimension attributes that change over time. Type 1 overwrites the old value (no history). Type 2 adds a new row with validity dates and a current flag, preserving history. Type 3 keeps the previous value in an extra column. Type 2 is the most common for analytics.

3Normalized vs denormalized models for analytics?

Mid

Normalized models avoid duplication and suit transactional systems. Analytics favors denormalized or dimensional models because columnar warehouses scan wide tables efficiently and analysts write simpler queries. Wide denormalized “one big table” models are common in modern warehouses.

4Write a query to deduplicate events, keeping the latest version.

Mid
SELECT * FROM (
  SELECT *, ROW_NUMBER() OVER (PARTITION BY event_id ORDER BY updated_at DESC) AS rn
  FROM raw_events
) t
WHERE rn = 1;

5What is the grain of a fact table, and why does it matter?

Mid

The grain defines what one row represents (one order line, one daily balance per account). Declaring it explicitly prevents double counting, mixed levels of detail and wrong joins.

Pipelines and processing

6ETL vs ELT?

Junior

ETL transforms data before loading it into the warehouse. ELT loads raw data first and transforms it inside the warehouse (often with dbt), using the warehouse’s compute. ELT is the common pattern with cloud warehouses because it keeps raw data and makes transformations easy to change.

7What makes a pipeline idempotent, and why does it matter?

Mid

Running it again for the same input produces the same result, without duplicates. It makes retries and backfills safe. Techniques: overwrite partitions instead of appending, use MERGE/upserts on keys, and deterministic processing keyed by date or batch ID.

8How do you do incremental loads?

Mid

Process only new or changed data, using a watermark (an updated_at timestamp or a monotonically increasing ID) or change data capture from the source database’s log. Handle late updates by reprocessing a lookback window and merging on keys.

9What is change data capture (CDC)?

Mid

Reading inserts, updates and deletes from a database’s transaction log (for example with Debezium) and streaming them to other systems. It captures every change with low impact on the source, unlike periodic full-table queries.

10How do you backfill two years of data for a changed pipeline?

Senior

Make the pipeline idempotent and partitioned by date, test the new logic on a sample, run the backfill in batches with controlled parallelism to protect sources and costs, write to a separate location and validate against the old output, then swap atomically and communicate the change to data consumers.

Get Data Engineer answer points in real time during your interview

Sottena listens to the interviewer, detects each question and shows short answer points in about a second. 150 free credits, no card required.

Batch and streaming

11Batch vs streaming processing?

Junior

Batch processes bounded data on a schedule: simpler, cheaper, higher latency. Streaming processes unbounded data continuously with seconds of latency: needed for real-time use cases like fraud detection, but harder to build and operate. Many use cases are fine with micro-batches every few minutes.

12How does Kafka work?

Mid

Producers write messages to topics split into partitions, which are append-only logs replicated across brokers. Consumers in a consumer group divide partitions among themselves and track offsets. Ordering is guaranteed within a partition, so the partition key determines ordering.

13Event time vs processing time, and how do you handle late data?

Mid

Event time is when something happened; processing time is when the system sees it. Windowed aggregations should use event time, with watermarks that define how long to wait for late events, plus rules for updating results or sending very late data to a side output.

14What does exactly-once processing mean in streaming?

Senior

That each event affects the result once, even with failures and retries. It is achieved with checkpointing of state and offsets, transactional or idempotent sinks, and deduplication by event ID. End-to-end guarantees depend on both the source and the sink.

Spark and distributed processing

15What is a shuffle in Spark, and why is it expensive?

Mid

Redistributing data across executors by key, required for joins, groupBy and repartitioning. It involves disk and network I/O and serialization. Reduce it by filtering early, broadcasting small tables, pre-partitioning, and aggregating before joins.

16What is data skew, and how do you fix it?

Mid

When a few keys have far more data than others, so a few tasks take much longer. Fixes: salting hot keys, broadcast joins, handling hot keys separately, adaptive query execution, and reconsidering the partitioning key.

17Transformations vs actions in Spark?

Mid

Transformations (filter, select, join) are lazy and build an execution plan; actions (count, write, collect) trigger execution. Laziness lets Spark optimize the whole plan. Avoid collect() on large data, which brings everything to the driver.

18Why use columnar formats like Parquet?

Mid

They store data by column with compression and statistics, so queries read only the needed columns and skip row groups with predicate pushdown. Combined with partitioning, they cut storage and query costs significantly compared with CSV or JSON.

Storage and platforms

19Data warehouse vs data lake vs lakehouse?

Mid

A warehouse stores structured, modeled data with strong SQL performance. A lake stores raw data of any type cheaply in object storage. A lakehouse adds table formats (Delta Lake, Apache Iceberg, Hudi) on top of the lake for ACID transactions, schema evolution and time travel, so warehouse-like analytics can run on lake storage.

20How do you choose a partitioning strategy?

Mid

Partition by the column most queries filter on, often a date. Avoid too many small partitions (high-cardinality keys) and very large ones. Combine with clustering or sorting on secondary filter columns.

21How do you control warehouse costs?

Senior

Monitor cost by user, team and query; partition and cluster large tables; avoid SELECT *; use incremental models; set warehouse auto-suspend and right-size compute; materialize expensive repeated queries; and delete or archive unused tables.

Orchestration

22What does an orchestrator like Airflow do?

Junior

It schedules and runs pipelines as DAGs of tasks with dependencies, retries, alerts and backfills, and shows their status. Dagster and Prefect are alternatives with a stronger focus on data assets.

23What are good practices for Airflow DAGs?

Mid

Keep tasks idempotent and atomic, pass small metadata between tasks (not data), avoid heavy logic in the DAG file itself, use the logical date for partitioning, set retries and SLAs, and keep DAGs in version control with tests.

24What is dbt used for?

Mid

Transforming data inside the warehouse with SQL models, managing dependencies between them, running tests (unique, not null, relationships), generating documentation and lineage, and supporting incremental models.

Data quality and governance

25How do you ensure data quality?

Mid

Tests at each stage (schema, uniqueness, nulls, referential integrity, freshness, volume and distribution checks), data contracts with producers, alerting to owners, quarantining bad data, and clear ownership. Tools: dbt tests, Great Expectations, Soda, observability platforms.

26A dashboard shows wrong numbers. How do you investigate?

Mid

Trace lineage from the dashboard back to sources, check freshness and recent pipeline runs, compare row counts and totals at each step, look for schema changes upstream, duplicates from joins and time zone issues. Fix, backfill if needed, add a test and notify users.

27How do you handle personal data in a data platform?

Senior

Classify sensitive columns, restrict access with roles and column-level security or masking, pseudonymize where possible, keep retention policies, support deletion requests across tables and backups, and log access for auditing, in line with regulations such as GDPR.

Pipeline design

28Design a pipeline that ingests clickstream events for analytics.

Senior

Collect events through an API or SDK into Kafka (or a managed equivalent); validate against a schema registry; land raw events in object storage in Parquet, partitioned by date; build sessionized and aggregated tables with Spark or the warehouse; expose them through modeled tables and dashboards; add data quality checks, late-data handling, deduplication by event ID and retention policies.

29How would you migrate from a legacy ETL system to a modern stack?

Senior

Inventory pipelines and consumers, prioritize by value and risk, build the new stack (ELT, orchestration, tests) alongside the old one, migrate pipeline by pipeline with parallel runs and reconciliation of outputs, switch consumers gradually, and decommission the old system once parity is proven.

30Tell me about a pipeline you built.

Mid

Use the STAR method: the business need, data volume and latency requirements, the architecture and why you chose it, problems you hit (late data, skew, cost), how you made it reliable, and the impact.

How to prepare

  1. Practice SQL and modelingWindow functions, deduplication, SCD Type 2, star schemas.
  2. Explain reliability patternsIdempotency, incremental loads, backfills, late data, retries.
  3. Know one stack deeplyFor example Airflow + dbt + Snowflake/BigQuery, or Spark + Kafka + Iceberg.
  4. Practice pipeline designClickstream, CDC from a database, daily reporting, real-time metrics.
  5. Prepare a data quality storyAn incident, how you found it, and what you changed.

Get answer points in real time during your interview

Sottena listens to the interviewer, detects each question and shows short answer points in about a second. 150 free credits, no card required.

Related interview questions