Data & Cloud Engineering · 2026

Top 50 Data Engineer Interview Questions & Answers 2026 (SQL, PySpark & Architecture)

·25 min read·Intervio Data Architecture Group

Key Takeaways — Data Engineering Interviews 2026

  • •Core Evaluation Pillars: 1. Advanced SQL (Windowing, CTEs, self-joins), 2. Distributed Computing (Apache Spark / PySpark internals), 3. Data Lakehouse Architecture (Delta Lake, Iceberg), and 4. Pipeline Orchestration (Airflow, dbt).
  • •PySpark Shuffling & Skew: Top interviewers probe memory spillage to disk, broadcast hash joins for small dimension tables, and salting keys to resolve data skew.
  • •Data Modeling Patterns: Dimensional modeling (Kimball Star Schema vs Inmon Snowflake), Slowly Changing Dimensions (SCD Type 1, 2 & 3), and Change Data Capture (CDC).
  • •Idempotency in Pipelines: Writing ETL/ELT pipelines where re-running for a given date partition does not produce duplicate records or corrupt downstream analytics.

1. Apache Spark & PySpark Architecture Internals

In interviews at Netflix, Uber, Walmart, Amazon, and top fintechs, PySpark questions test your understanding of distributed execution under the hood:

Q: What is the difference between Narrow and Wide Transformations in Spark?

• Narrow Transformation: Each partition of the parent RDD/DataFrame is used by at most one partition of the child RDD. No network shuffle required! Examples: map(), filter(), withColumn(). Fast and scalable.
• Wide Transformation: Multiple child partitions depend on data across multiple parent partitions. Requires an expensive network data shuffle across worker nodes! Examples: groupBy(), join(), distinct(), repartition().

Q: How do you handle Data Skew in PySpark Joins?

Data skew occurs when an unbalanced partition key causes 95% of data to bottleneck on a single Spark executor, causing OutOfMemory (OOM) errors or endless task stages.

1. Broadcast Hash Join: If one DataFrame is small (< 10MB default, up to ~1GB), use broadcast(small_df) to send copies to all executors, eliminating the shuffle completely!
2. Salting: Append a random integer (e.g., 0 to 9) to the skewed join key in table A, and replicate matching keys in table B across all salt values, distributing the workload evenly across 10 executors.
from pyspark.sql import functions as F

# Broadcast Join in PySpark
large_transactions_df = spark.read.parquet("s3://data/transactions")
small_stores_df = spark.read.parquet("s3://data/stores")

joined_df = large_transactions_df.join(
    F.broadcast(small_stores_df),
    on="store_id",
    how="inner"
)

2. Advanced SQL for Data Engineers (Window Functions & CTEs)

SQL accounts for 40% of every data engineering technical screening. You must know how to use analytical window functions effortlessly:

Problem: Deduplicate Customer Records Keeping the Latest Timestamp

WITH RankedCustomers AS (
  SELECT
    customer_id,
    email,
    updated_at,
    ROW_NUMBER() OVER (
      PARTITION BY customer_id
      ORDER BY updated_at DESC
    ) as rn
  FROM customers
)
SELECT customer_id, email, updated_at
FROM RankedCustomers
WHERE rn = 1;

ROW_NUMBER() assigns unique integers 1, 2, 3... RANK() assigns identical ranks with gaps (1, 2, 2, 4), and DENSE_RANK() assigns identical ranks without gaps (1, 2, 2, 3).

Problem: Month-over-Month Revenue Growth with LAG()

SELECT
  month,
  monthly_revenue,
  LAG(monthly_revenue, 1) OVER (ORDER BY month) AS prev_month_revenue,
  ROUND(
    ((monthly_revenue - LAG(monthly_revenue, 1) OVER (ORDER BY month)) /
     LAG(monthly_revenue, 1) OVER (ORDER BY month)) * 100, 2
  ) AS mom_growth_pct
FROM monthly_sales;

3. Data Modeling: Star Schema, Snowflake & SCDs

Interviewers want to see if you understand warehouse design for analytical query efficiency:

Star Schema (Kimball)

A centralized Fact Table (containing numeric metrics, e.g. amount, quantity) joined directly to denormalized Dimension Tables (customer, product, store). Highly optimized for fast OLAP slice-and-dice queries with minimal joins.

Snowflake Schema (Inmon)

Dimension tables are normalized into sub-dimensions (e.g., product → product_subcategory → product_category). Reduces data redundancy but requires complex multi-table joins during BI reporting queries.

Slowly Changing Dimensions (SCDs):

  • SCD Type 1: Overwrites old data with new data (No historical tracking).
  • SCD Type 2: Creates a new record with effective date range (start_date, end_date, is_current flag). Retains complete audit history!
  • SCD Type 3: Adds a new column to store previous value (e.g., current_city, previous_city). Tracks partial history.

4. Modern Data Lakehouses: Delta Lake, Iceberg & Parquet

Why has the industry migrated from traditional data warehouses to open table formats like Delta Lake and Apache Iceberg on top of Apache Parquet?

  • ACID Transactions on Object Storage: Atomic commits prevent concurrent readers from seeing partial writes or corrupted S3 partitions.
  • Time Travel: Query previous snapshots of data for machine learning reproducibility or rollback after accidental data drops.
  • Schema Evolution & Enforcement: Prevent incoming bad data schemas from corrupting downstream gold tables.
  • Partition Pruning & Z-Ordering: Colocate related data along multidimensional curves to skip scanning 90% of file footers during queries.

5. ETL Pipeline System Design & Airflow Orchestration

When asked to “Design an end-to-end data pipeline for a food delivery platform processing 50M events/day”:

// Modern Data Stack Architecture
1. Ingestion: Kafka / AWS Kinesis streams raw JSON clickstream events
2. Bronze Layer: Spark Structured Streaming writes raw append-only Parquet to Delta Lake
3. Silver Layer: Cleansed, deduplicated, schema-validated tables with SCD2 dimensions
4. Gold Layer: Aggregated star-schema business marts powered by dbt transformations
5. Orchestration: Apache Airflow DAGs with catchup=False, retries=3, and Slack alert callbacks

6. Frequently Asked Data Engineering Questions

What is the difference between ETL and ELT?

In ETL (Extract, Transform, Load), data is transformed on an external compute server before loading into the warehouse. In ELT (Extract, Load, Transform), raw data is loaded directly into scalable cloud warehouses/lakehouses (Snowflake, BigQuery, Databricks) and transformed in-place using SQL/dbt.

Why is Parquet preferred over CSV/JSON for big data?

Parquet is columnar, allowing query engines to read only the specific columns queried. It provides massive compression ratios (Snappy/Gzip) and stores column min/max statistics in file footers for instantaneous partition pruning.

Free Data Engineering Interview Practice

Ace Your Data Engineering Interview with Sophia AI

Practice live voice technical rounds with Sophia covering PySpark internals, complex SQL windowing, Data Lakehouse design, and pipeline architecture. Get instant scores. 100% Free.