Data Engineering Interview Questions and Answers: 2026 Guide

Data engineering has matured into one of the most intellectually demanding specializations in the technology sector. As companies shift from monolithic relational databases to distributed lakehouses, streaming micro-architectures, and real-time AI ingestion layers, technical hiring standards have escalated accordingly.
In a modern technical screen, interviewers rarely settle for simple textbook definitions. They assess whether you can reason about distributed system failures, optimize petabyte-scale data shuffles, choose the correct data storage abstractions, and guarantee idempotent processing during pipeline backfills.
Whether you are preparing for a senior data platform role or gearing up for your next tech screen alongside our complete technical interview preparation guide, mastering these foundational and advanced data engineering interview questions will help you demonstrate clear architectural vision and deep execution capability.
1. Architectural Foundations: Batch, Streaming & Lakehouses
Q1: What are the differences between Lambda, Kappa, and Medallion Lakehouse architectures?
Interviewers frequently ask this question to evaluate your understanding of real-time data movement and storage trade-offs.
The Lambda Architecture
Lambda splits data processing into two distinct layers:
- Batch Layer (Cold Path): Computes immutable, comprehensive views over historical data using engines like Apache Spark or Hadoop MapReduce. Highly accurate, fault-tolerant, but high latency (hours to days).
- Speed Layer (Hot Path): Processes low-latency deltas using streaming engines like Apache Flink or Apache Storm to update real-time views. Low latency, but historically prone to eventual consistency discrepancies.
- Serving Layer: Merges queries across both batch and real-time views.
Trade-off: Lambda introduces high operational complexity because engineers must write and maintain identical business logic in two separate codebases across different processing frameworks.
The Kappa Architecture
Proposed by Jay Kreps, Kappa simplifies Lambda by eliminating the batch layer entirely:
- Everything is a stream: A high-throughput, replayable append-only distributed log (like Apache Kafka or Apache Pulsar) serves as the single source of truth.
- When code or schema changes require reprocessing, a new consumer group reads the log from offset zero while the old consumer continues serving live queries until catch-up is achieved.
Trade-off: Replaying months or years of historical data through a streaming log can be expensive and resource-intensive compared to vectorized columnar scans over object storage.
The Modern Medallion Lakehouse (Bronze, Silver, Gold)
Enabled by ACID table formats such as Delta Lake, Apache Iceberg, and Apache Hudi sitting directly on top of cloud object storage (S3, GCS, ADLS):
- Bronze (Raw / Ingestion): Unmodified raw landing zone preserving source schemas and ingestion metadata.
- Silver (Cleaned / Conformed): Validated, deduplicated, enriched data with standardized timestamps and referential keys.
- Gold (Aggregated / Business-Ready): Star-schema dimensional models and metric tables optimized for BI tools and machine learning models.
Interview Tip: Highlight how ACID metadata layers (manifest files and transaction logs) provide atomic commits, time travel, and file compaction directly over parquet files, bridging the gap between streaming ingestion and fast analytical queries.

2. Distributed Processing & Apache Spark
Distributed computing questions test your ability to diagnose bottlenecks in memory management and network I/O.
Q2: What causes data skew in Apache Spark, and how do you resolve it?
Data skew occurs when data is partitioned unevenly across cluster executors, causing a small subset of workers (stragglers) to process a massive volume of data while others sit idle.
Root Causes
- Skewed Join Keys: A categorical column contains a high frequency of nulls, default values (e.g.,
-1), or popular entities (e.g., a celebrity user ID). - Uneven Hash Partitioning: Default hash functions mapping disproportionate record volumes to the same partition ID.
Practical Solutions
# 1. Salting: Adding random noise to the join key to redistribute heavy keys
import pyspark.sql.functions as F
# Add salt factor (e.g., 0-9) to the skewed table
skewed_df = skewed_df.withColumn("salt", F.concat(F.col("user_id"), F.lit("_"), F.floor(F.rand() * 10)))
# Replicate keys across salt values in the smaller lookup dimension
lookup_df_replicated = lookup_df.withColumn("salt_array", F.array([F.lit(i) for i in range(10)])) \
.withColumn("salt_factor", F.explode("salt_array")) \
.withColumn("salt", F.concat(F.col("user_id"), F.lit("_"), F.col("salt_factor")))
# Join on the salted composite key
result_df = skewed_df.join(lookup_df_replicated, on="salt", how="inner").drop("salt", "salt_array", "salt_factor")
Other battle-tested mitigations to mention to your interviewer:
- Adaptive Query Execution (AQE): In modern Spark 3.x+, enabling
spark.sql.adaptive.enabled = trueandspark.sql.adaptive.skewJoin.enabled = trueautomatically splits skewed partitions at runtime. - Broadcast Hash Join: If the right table is small enough (under
spark.sql.autoBroadcastJoinThreshold, typically 10MB to 100MB), broadcasting it eliminates the shuffle phase completely.
Q3: How do Narrow and Wide Transformations differ in Apache Spark?
- Narrow Transformations: Each input partition contributes to at most one output partition (e.g.,
map(),filter(),flatMap()). Data operations occur strictly in-memory within the local executor thread without network transfers. - Wide Transformations: Multiple input partitions contribute to output partitions (e.g.,
groupByKey(),reduceByKey(),join(),distinct()). Wide transformations require a Shuffle, writing intermediate data to local disk, transmitting data across the cluster network, and reorganizing records by partition key.
Senior Candidate Nuance: Emphasize that optimizing Spark jobs primarily involves reducing shuffle read/write sizes, eliminating unnecessary wide transformations, and pruning partition filters before joins.
3. Data Warehousing & Dimensional Modeling
Modeling questions assess your ability to design schemas that balance query performance against storage anomalies.
Q4: Compare Star Schema vs. Snowflake Schema in modern cloud data warehouses.
In traditional on-premise relational databases, storage was expensive and disk I/O was slow, which made normalization crucial. In cloud data warehouses (Snowflake, BigQuery, Databricks SQL, Redshift), the trade-offs look very different:
| Dimension | Star Schema | Snowflake Schema |
|---|---|---|
| Structure | Denormalized dimension tables directly linked to central fact tables. | Normalized dimension hierarchies split into child tables (e.g., Product -> Category -> Department). |
| Join Complexity | Low (single-hop joins between facts and dimensions). | High (multi-hop joins requiring recursive scans). |
| Query Performance | Fast; minimizes join overhead and benefits from columnar block caching. | Slower on large analytical queries due to multi-table joins. |
| Maintenance | Higher risk of data redundancy in dimensions. | Strict referential integrity, smaller dimension footprint. |
| 2026 Best Practice | Heavily preferred for BI and analytics in cloud warehouses. | Reserved for highly nested, rapidly changing entity graphs. |
Q5: How do you implement Slowly Changing Dimensions (SCD Type 1, 2, and 3)?
Interviewers use SCD questions to test your real-world transactional integrity experience:
- SCD Type 1 (Overwrite): Updates the existing record in place. Historical data is lost. Used for correcting typographical errors or non-historical attributes (e.g., fixing a misspelling in a user name).
- SCD Type 2 (Historical Versioning): Inserts a new row with surrogate keys, tracking valid date intervals (
valid_from,valid_to) and a boolean flag (is_current). Essential when financial audits, billing, or sales attribution depend on knowing state at a specific point in time. - SCD Type 3 (Previous Value Column): Adds a
previous_statuscolumn alongside thecurrent_status. Tracks only the immediately preceding state.
Modern Lakehouse Implementation: Explain how tools like dbt (dbt snapshot) automate SCD Type 2 logic using hash checks (check_cols or updated_at) directly via SQL MERGE statements.
4. Streaming, Message Brokers & Event Driven Systems
Q6: How does Apache Kafka ensure message ordering, and what are its delivery guarantees?
Understanding distributed logs is essential for building scalable ingestion backbones.
Partition-Level Ordering
Kafka guarantees ordering only within a single partition, not across the entire topic.
- When producing a message, if a
keyis provided, Kafka hashes the key (murmur2(key) % num_partitions) to determine the target partition. All events sharing the exact same key land on the same partition in sequential offset order. - If no key is provided, Kafka distributes messages evenly across partitions using sticky round-robin partitioning.
Delivery Semantics
- At-Most-Once: Messages may be lost but are never re-delivered. Consumers commit offsets before processing records. If the consumer crashes during execution, those messages are skipped.
- At-Least-Once: Messages are never lost but may be duplicated. Consumers process records before committing offsets. If the worker crashes mid-batch, the replacement worker reprocesses uncommitted offsets.
- Exactly-Once Semantics (EOS): Requires coordination between producer and consumer:
- Idempotent Producer: Producer assigns a unique Producer ID (
PID) and monotonically increasing sequence number to each message. The broker rejects duplicate sequence numbers. - Transactional API: Coordinates atomic writes across multiple partitions and consumer offset topics using a two-phase commit protocol.
- Idempotent Producer: Producer assigns a unique Producer ID (
5. Pipeline Orchestration, Quality & Idempotency
Q7: What is an idempotent data pipeline, and why is it critical for backfills?
An operation is idempotent if running it multiple times with the same input produces the exact same end state without duplicating data or corrupting downstream metrics.
How to Design Idempotent Pipelines
- Avoid Append-Only Blind Writes: Never run raw
INSERT INTOqueries on batch jobs that might fail halfway and be restarted by an orchestrator like Airflow or Dagster. - Partition Overwrites & Atomic Merges:
-- Idempotent batch write using partition replacement INSERT OVERWRITE TABLE analytics.daily_active_users PARTITION (event_date = '2026-10-15') SELECT user_id, COUNT(session_id) as session_count FROM staging.events WHERE event_date = '2026-10-15' GROUP BY user_id; - Deterministic Surrogate Keys: Generate primary surrogate keys using cryptographic hashes of natural composite business keys (e.g.,
SHA256(user_id || event_timestamp || event_type)). This ensuresUPSERT/MERGE INTOoperations match existing records reliably.
When preparing for scenario-based questions involving queries and optimization, reviewing dedicated SQL interview questions for data engineers provides additional query patterns.
6. Real-Time Scenario: Designing an Ingestion Engine for 100M Events/Day
The Interview Question:
"Design a real-time analytics pipeline that ingests clickstream telemetry from mobile applications, supports sub-minute dashboard metrics, and archives historical data for ad-hoc analytical queries."
How to Structure Your Whiteboard Response:
-
Requirements & Constraints Clarification:
- Ingestion rate: 100M events / 86,400 seconds ≈ 1,160 events/second average, with peak surges of 10,000 events/second.
- Latency SLA: Dashboard metrics under 60 seconds; historical data queryable within 15 minutes.
- Data volume: Average payload 1KB = ~100GB/day raw data.
-
Ingestion & Buffer Layer:
- Client applications send encrypted JSON/Protobuf payloads through an API Gateway to an Apache Kafka cluster.
- Topic partitioned by
user_idorsession_id(e.g., 32 partitions to allow consumer scale-out).
-
Stream Processing (Hot Path):
- Apache Flink or Spark Structured Streaming consumes from Kafka using 10-second tumbling and sliding micro-windows.
- Computes rolling aggregation metrics (active users, click counts, conversions) and writes directly to an in-memory or distributed key-value store (Redis or ClickHouse) for low-latency dashboard queries.
-
Storage & Analytical Lakehouse (Cold Path):
- Ingestion connectors (Kafka Connect or Spark streaming micro-batches) write raw events into cloud object storage in Apache Iceberg / Delta Lake format.
- Apply file compaction jobs (bin-packing small parquet files into optimal 128MB–512MB chunks) to prevent the "small file problem" from degrading query performance.
-
Monitoring & Governance:
- Schema enforcement via Confluent Schema Registry (Avro or Protobuf) to quarantine malformed records into a Dead Letter Queue (DLQ).
- Observability tracking consumer lag, end-to-end data latency, and slot utilization.
For candidates aiming for senior roles, understanding system scaling patterns is vital; explore our breakdown on system design interview guidelines to articulate these trade-offs fluently.
7. How to Practice Technical Explanations Under Pressure
Knowing distributed systems theory on paper is different from verbally explaining memory pressure, partition strategies, and CAP theorem nuances under pressure. If an interviewer poses an edge-case question you haven't anticipated, our guide on handling interview questions when you don't know the answer provides proven communication strategies.
To build true interview confidence, simulate realistic live interviews on totop.app. You can paste the exact Data Engineer job description you are targeting, and our AI interview simulator will conduct an interactive, voice-enabled technical screen. It probes your architecture choices, challenges your query optimization logic, and delivers actionable, rubric-based feedback to help you land your dream data engineering offer.