Strategy: These questions appear in nearly every Data Engineer round (TCS / Infosys / Accenture / Cognizant / Tiger Analytics / Mu Sigma / EXL / Fractal / product companies). Prepare crisp 2–3 minute answers with one project example each.
🔥 Introduction & Resume-Based
- Walk me through your resume / Tell me about yourself.
- Explain your current project — architecture end to end.
- What is your day-to-day role as a Data Engineer?
- What was the most challenging problem you solved in your last project?
- Why are you switching from SAP / Support / Testing to Data Engineering?
- Which tools and technologies are you most comfortable with?
- What does a typical data pipeline look like in your project?
- Draw the architecture diagram of your most recent pipeline on the whiteboard.
- How big is your data (volume / velocity / variety)?
- What is the team size and how is work divided?
- What is your role in design vs development vs production support?
- Describe a production incident you handled and the RCA.
- What new technology have you learned in the last 6 months?
- Have you worked on real-time pipelines or only batch?
- Where do you see yourself in 3 years?
🔥 Concept Fundamentals (Every Interview)
- What is the difference between ETL and ELT? Which one is preferred today and why?
- What is a data lake vs data warehouse vs data lakehouse vs data mart?
- Explain OLTP vs OLAP with examples.
- What is a star schema vs snowflake schema? Which do you prefer and why?
- What are SCD types 1, 2, 3, 4, 6? Write SQL for SCD Type 2.
- What is a fact table vs dimension table? Types of fact tables?
- What is partitioning vs bucketing vs clustering? When to use each?
- Difference between RDBMS and NoSQL — and when to choose which?
- What is normalization vs denormalization? Why do warehouses denormalize?
- What is data modeling? Walk through your modeling approach for a new domain.
- Batch vs micro-batch vs streaming — give use cases for each.
- What is idempotency in a data pipeline and how do you achieve it?
- What is at-least-once, at-most-once, exactly-once delivery?
- How do you handle late-arriving data?
- How do you handle schema evolution / schema drift in pipelines?
- What is data lineage and why does it matter?
- What is the difference between row-based and columnar storage?
- Why is Parquet preferred over CSV for big data?
- Compare Parquet vs ORC vs Avro vs JSON vs CSV.
- What is the CAP theorem? Apply it to a system you have built.
🏆 Quick-Fire Mixed
- Difference between WHERE and HAVING.
- What is the difference between RANK, DENSE_RANK and ROW_NUMBER?
- Difference between UNION and UNION ALL.
- What is the difference between coalesce and repartition in Spark?
- Difference between cache and persist in Spark.
- Difference between map and flatMap.
- Difference between DataFrame, Dataset and RDD.
- What is a broadcast join? When does Spark do it automatically?
- Difference between narrow vs wide transformations.
- Difference between Snowpipe and a COPY INTO statement.
- Difference between Snowflake Streams and Tasks.
- Difference between Airflow operators, sensors and hooks.
- What is the difference between S3 Standard, IA, Glacier?
- Difference between Glue Crawler and Glue Job.
- Difference between dbt seed, source, model, snapshot, test.
🎓 5+ Years Specific Signals
- How do you decide when to introduce a new tool in your stack?
- How do you do cost optimisation for a cloud data platform?
- How do you onboard a new data source from scratch?
- How do you handle stakeholder requirements that keep changing mid-sprint?
- Walk me through a migration you led (on-prem → cloud, or one stack → another).
- How have you mentored juniors / done code reviews?
- What is your definition of "production-ready" pipeline?
- How do you write a design document before building a pipeline?
- What metrics do you track to know a pipeline is healthy?
- How do you handle on-call and PagerDuty / alert fatigue?
Reality: SQL is the #1 round that filters candidates. For 5+ years, expect 4–6 hands-on queries on window functions, joins, CTEs, and tricky aggregation. Practice on real datasets (StrataScratch, LeetCode SQL, DataLemur).
🔥 SQL Concepts (Theory)
- Difference between INNER, LEFT, RIGHT, FULL OUTER, CROSS and SELF JOIN.
- Difference between WHERE and HAVING clause.
- Difference between GROUP BY and PARTITION BY.
- What is the execution order of an SQL query (FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT)?
- What is a CTE? Difference between CTE, subquery, temp table, view, materialized view.
- What is a recursive CTE? Give a real use case.
- Difference between RANK, DENSE_RANK, ROW_NUMBER, NTILE, PERCENT_RANK.
- Explain LEAD, LAG, FIRST_VALUE, LAST_VALUE with examples.
- What is a window function frame (ROWS vs RANGE, UNBOUNDED PRECEDING)?
- What is the difference between DELETE, TRUNCATE and DROP?
- Difference between primary key, unique key, candidate key, surrogate key, natural key.
- What are ACID properties? Explain with a banking example.
- What is normalisation? Explain 1NF, 2NF, 3NF, BCNF.
- What is denormalisation? Why is it used in warehouses?
- What are indexes? Difference between clustered and non-clustered.
- How does an index affect insert/update/delete performance?
- What is the difference between EXISTS and IN? Which is faster?
- What is a correlated subquery? Why is it expensive?
- Difference between UNION and UNION ALL.
- What is COALESCE vs NVL vs ISNULL vs NULLIF?
- What is the difference between CHAR, VARCHAR, VARCHAR2, TEXT?
- What is the difference between CAST and CONVERT?
- What is a stored procedure vs function vs trigger?
- What are pivot and unpivot operations?
- What is a query plan / explain plan? How do you read it?
🔥 Hands-On SQL Problems (Most Asked)
- Find the Nth highest salary in each department (multiple ways — window, subquery, DENSE_RANK).
- Find employees who earn more than their manager.
- Find duplicate rows in a table and delete duplicates keeping the latest.
- Find consecutive login days for each user (gaps and islands problem).
- Find users who logged in for 3 consecutive days.
- Calculate running total / cumulative sum per customer.
- Calculate 7-day moving average of sales.
- Find the second highest salary department-wise without using LIMIT/OFFSET.
- Pivot monthly sales data into columns for each month.
- Unpivot a wide table into long format.
- Find customers who placed orders in 2024 but not in 2025.
- Calculate month-over-month growth and YoY growth.
- Find the top 3 products per category by revenue.
- Split a comma-separated string into rows (STRING_SPLIT / SPLIT_TO_TABLE / LATERAL).
- Find the percentage of total per row (window without partition).
- Identify sessions: group events that are within 30 minutes of each other.
- Find first and last event per user in a single query.
- Compute median salary without using PERCENTILE_CONT.
- Find customers whose order amount increased in 3 consecutive orders.
- Build a calendar table and use it to fill missing dates.
- Find employees who never took leave (anti-join).
- Identify overlapping date ranges from a table of bookings.
- Find products that were sold every month in 2025.
- Detect price changes — get previous price vs current price using LAG.
- Write SQL for SCD Type 2 implementation (insert new + close old version).
- Identify the longest streak of wins for each player.
- Find the department with highest average salary.
- Calculate retention: % of users from Jan who came back in Feb.
- Detect duplicate records across two tables.
- Write a query to find friends-of-friends (graph-like in SQL).
🎓 Performance Tuning (5+ Years)
- How do you optimise a slow SQL query? Walk through your approach.
- How do you read an EXPLAIN plan? What do you look for first?
- When does an index hurt performance?
- Difference between full table scan, index scan, index seek.
- What is a covering index?
- How do you reduce shuffle in a large join?
- Why are correlated subqueries slow and how do you rewrite them?
- How does the database choose join order? Can you force it?
- What are statistics on a table and how do they affect query plans?
- Difference between hash join, merge join, and nested loop join.
- What is predicate pushdown? Give an example with Parquet.
- How do you handle parameter sniffing issues?
- How do you optimise GROUP BY on a 1 billion row table?
- When should you partition vs index a table?
- What is a materialised view? How is it different from a view? Refresh strategies?
Why important: Spark is asked in ~90% of DE interviews. Know architecture, transformations, optimisation, joins, partitioning deeply. Be ready to explain a Spark UI.
🔥 Architecture & Internals
- Explain Spark architecture — Driver, Executors, Cluster Manager, Workers.
- What happens internally when you run
df.show()?
- What is a Spark Job vs Stage vs Task?
- How does Spark decide stages? (Wide vs narrow transformations.)
- What is lazy evaluation in Spark? Why is it powerful?
- Difference between RDD, DataFrame, Dataset. Which do you use and why?
- What is Catalyst Optimiser? Walk through its phases.
- What is Tungsten engine?
- What is Adaptive Query Execution (AQE)? Which configs enable it?
- Explain DAG and DAG scheduler.
- What is the difference between client mode and cluster mode?
- How does Spark handle fault tolerance? (Lineage + RDD recomputation.)
- What is checkpointing? Difference between persist and checkpoint.
- Difference between cache() and persist(). What storage levels exist?
- What happens when you call collect() on a 1 TB DataFrame?
🔥 Transformations & Actions
- List 10 common transformations and 5 actions.
- Difference between map and flatMap with code example.
- Difference between reduce and reduceByKey.
- Difference between groupByKey and reduceByKey — why is reduceByKey better?
- Difference between coalesce and repartition.
- How does repartition(10) work internally? Does it cause shuffle?
- What are window functions in Spark? Give an example.
- How to use
when/otherwise for case-style logic?
- What is the difference between
filter() and where()?
- How do you drop duplicates considering only some columns?
- How do you write a Spark UDF? Why are UDFs discouraged?
- Difference between Python UDF, Pandas UDF, Scala UDF — performance order.
- How do you handle nulls in joins?
- How do you flatten a nested JSON / array column?
- How do you explode and pivot in Spark?
🎓 Joins & Shuffles (5+ Years Hot Topic)
- What types of joins exist in Spark? (Shuffle hash, sort-merge, broadcast, BNLJ.)
- How does Spark choose a join strategy?
- What is a broadcast join? Threshold config (
spark.sql.autoBroadcastJoinThreshold)?
- How to broadcast a DataFrame manually?
- What is data skew? How do you detect it from Spark UI?
- How to handle skew — salting, AQE skew join, isolated processing?
- Why is GROUP BY on a high-cardinality skewed key slow?
- What is partition pruning? Predicate pushdown? Projection pushdown?
- How does Spark handle wide rows / very small files (small files problem)?
- What is bucketing? When is it useful vs partitioning?
- How to repartition before a join to avoid shuffle?
- What is
spark.sql.shuffle.partitions? Default? How to tune?
- How do you handle a join where one side is 5 TB and other is 50 GB?
- What is dynamic partition pruning?
- What is the cost of a sort-merge join vs broadcast join?
🎓 Performance Tuning
- What configs do you usually tune? (executor memory, cores, parallelism, AQE, broadcast threshold.)
- How do you decide number of executors, executor cores, executor memory?
- What is the formula for executor sizing?
- What is off-heap memory in Spark? When to enable?
- What causes
OutOfMemoryError in driver vs executor?
- How do you fix an OOM in the executor?
- What is spill to disk? How to reduce it?
- What is the small files problem and how to fix it?
- How do you read 10,000 small JSON files efficiently?
- Difference between
coalesce before write vs repartition before write.
- How do you write Parquet partitioned by date efficiently?
- What is
maxRecordsPerFile when writing?
- How do you read Spark UI to debug a slow job?
- What do you look at in the SQL tab, Stages tab, Storage tab?
- How do you debug GC pressure?
🌊 Structured Streaming
- What is Structured Streaming? How is it different from Spark Streaming (DStream)?
- What is the micro-batch model?
- What output modes exist? (append, update, complete.)
- What is a watermark? How does it help in late data?
- How do you handle stateful aggregations?
- Trigger types — default, fixed interval, once, available-now, continuous.
- What are checkpoints in streaming and why are they critical?
- How do you achieve exactly-once with Spark + Kafka + S3?
- How do you handle schema evolution in a streaming job?
- How do you join streams with static tables / two streams?
📦 Delta Lake / Lakehouse
- What is Delta Lake? Why use it over plain Parquet?
- What is the transaction log (
_delta_log)?
- What is time travel? Give a syntax example.
- Difference between OPTIMIZE, VACUUM, ZORDER.
- How does Delta handle ACID transactions?
- What is MERGE INTO? Write a SCD2 using MERGE.
- What are Delta liquid clustering / generated columns?
- Difference between Delta Lake, Iceberg and Hudi.
- How does Delta avoid the small files problem?
- What is Change Data Feed (CDF) in Delta?
How to answer: Use a 6-step framework — (1) Clarify requirements (functional + non-functional, volume, latency, SLA) → (2) High-level architecture (ingest → store → process → serve) → (3) Storage choice (S3, Snowflake, OLTP, KV) → (4) Processing (batch / stream / micro-batch) → (5) Quality, monitoring, security, cost → (6) Trade-offs & bottlenecks.
Always Discuss
- Functional + non-functional requirements
- Volume, velocity, variety
- Latency SLA (real-time vs batch)
- Schema and data contracts
- Idempotency and exactly-once
- Backfill and replay strategy
- Data quality & observability
- Security (PII, encryption, RBAC)
- Cost & right-sizing
- DR & disaster recovery
Common Building Blocks
- Source: RDBMS, API, files, Kafka, IoT
- CDC: Debezium / AWS DMS
- Queue: Kafka / Kinesis / SQS
- Lake: S3 (raw / curated / refined)
- Process: Spark / Glue / EMR / Flink
- Warehouse: Snowflake / Redshift
- Transform: dbt
- Orchestrate: Airflow / Step Functions
- Serve: BI, API, ML feature store
- Monitor: CloudWatch / Datadog / Grafana
🔥 Classic DE System Design Problems
- Design an end-to-end batch pipeline: ingest 100 GB/day from MySQL → S3 → transform → Snowflake → BI tool.
- Design a real-time streaming pipeline: 1 M events/sec clickstream → process → serve dashboards with < 5 s latency.
- Design a CDC pipeline: capture changes from 50 production tables and replicate to Snowflake with < 1 min lag.
- Design a data lake on S3 with bronze/silver/gold layers, partitioning, file size targets, and access patterns.
- Design a data warehouse on Snowflake/Redshift for an e-commerce platform (orders, returns, inventory, marketing).
- Design an ingestion framework that onboards a new source in < 1 day via config (no code).
- Design a metadata / data catalog with lineage and ownership.
- Design a data quality framework with rules, dashboards, alerts, and SLAs.
- Design SCD Type 2 at scale for a 100M-row dimension with hourly updates.
- Design exactly-once pipeline: Kafka → Spark Structured Streaming → S3 (Delta) → Snowflake.
🎓 Advanced / Senior Problems
- Design a multi-tenant data platform with logical isolation and shared compute.
- Design a feature store (online + offline) for ML.
- Design a GDPR-compliant pipeline: right-to-be-forgotten, encryption, audit log.
- Design a streaming join of two unbounded streams (e.g., order events + payment events).
- Design a self-service analytics layer for analysts using dbt + BI tool.
- Design a migration from on-prem Hadoop/Hive to AWS + Snowflake — phased rollout, validation, cutover.
- Design a cost-optimisation framework across S3, Snowflake, EMR — measure ROI.
- Design data observability: freshness, volume, schema, distribution, lineage monitoring.
- Design a backfill system that can reprocess 1 year of data without breaking incremental loads.
- Design a fraud detection pipeline with < 100 ms inference latency.
- Design an ad-impressions pipeline handling 10 B events/day with deduplication.
- Design a marketplace order pipeline (Uber/Swiggy) — order → assignment → delivery → settlement.
- Design an IoT data platform for 10 M devices reporting every 10 seconds.
- Design a near-real-time inventory system across 500 warehouses.
- Design an A/B testing analytics pipeline with statistical significance computation.
📐 Non-Functional Deep-Dives
- How would you handle 10x growth in data volume next year?
- What is your strategy if the warehouse is becoming the bottleneck?
- How would you reduce monthly cloud bill by 30% without compromising SLAs?
- How would you migrate a critical pipeline with zero downtime?
- How would you design DR with RPO = 15 min and RTO = 1 hour?
- How would you handle PII across the whole platform?
- How would you implement role-based access on 5000 tables across 200 teams?
- How would you do tenant-level chargeback in a shared warehouse?
- How would you set up automated data contracts between producer and consumer teams?
- How would you implement a data mesh in a 1000-employee org?
What to expect: Data Engineer coding rounds are not hard algorithm rounds like SDE. Expect easy–medium problems on strings, lists, dicts, files, and one or two design-coding questions. Master string manipulation, deduplication, frequency counts, sorting, sliding window, two-pointer.
🔥 Most Asked Coding Problems
- Reverse a string / sentence / linked list.
- Find the first non-repeating character in a string.
- Check if two strings are anagrams.
- Find all anagrams of a word in a list.
- Find duplicates in a list / array.
- Remove duplicates while preserving order.
- Two sum / three sum problem.
- Find longest substring without repeating characters.
- Find the missing number in a list of 1..n.
- Find the most frequent element / top-k frequent words.
- Merge two sorted lists / arrays.
- Implement word count for a 100 GB log file (chunked reading).
- Flatten a nested dictionary / JSON.
- Group anagrams.
- FizzBuzz with twist.
- Find pairs of elements that sum to K (single pass).
- Compute the moving average of a stream.
- Implement LRU cache.
- Validate parentheses / balanced brackets.
- Rotate a list / array by K positions.
- Find the intersection / union of two arrays / lists.
- Reverse words in a sentence in-place.
- Find the kth largest element (heap).
- Compress a string (aaabb → a3b2).
- Implement an iterator class (or generator) over a paginated API.
🐍 Python-Heavy DE Coding
- Read a JSON file line by line and aggregate counts by field X.
- Given two CSV files (orders, customers), join them in Python without Pandas.
- Compute SCD Type 2 for a small dataset in Pandas / Python.
- Detect schema drift between two JSONs (added/removed/changed keys).
- Parse a deeply nested JSON and flatten to a single-level dict.
- Compute top 10 customers by revenue from a 5 GB CSV (chunked).
- Implement an idempotent retry decorator with exponential backoff.
- Write a function that detects duplicates across millions of rows efficiently (hash, Bloom filter).
- Implement a producer-consumer pattern with
queue.Queue and threads.
- Implement a generator that paginates an API and yields records.
- Parse a CSV with quoted commas correctly (csv module nuances).
- Compute the percentile of a list without numpy.
- Find the shortest path / dependencies in a DAG of tasks (topological sort).
- Implement rate-limited API client (token bucket).
- Build a small ETL framework class with
extract / transform / load methods.
🎓 PySpark Coding Snippets
- Read all CSVs in a folder, union them, dedupe on a key (latest), write Parquet partitioned by date.
- Implement SCD Type 2 in PySpark using MERGE on a Delta table.
- Compute 7-day rolling average per user using window functions.
- Handle skew on join — implement salting.
- Read JSON with nested arrays, explode, flatten and write as Parquet.
- Group by user and collect last 5 events as an array.
- Compute the difference between consecutive timestamps per user.
- Pivot a DataFrame: from long to wide.
- Read from Kafka, transform, write to Snowflake (Structured Streaming).
- Implement de-duplication on a stream using
dropDuplicatesWithinWatermark.
Framework: Use STAR — Situation, Task, Action, Result. Keep stories crisp (90 seconds). Have at least 5 reusable stories: one about ownership, one about failure, one about conflict, one about scale/impact, one about learning.
🟢 Leadership & Ownership
- Tell me about a time you led a project end-to-end.
- Describe a time you took ownership beyond your role.
- How do you handle ambiguous requirements?
- How do you mentor / onboard a junior?
- Describe a decision you made that significantly impacted the business.
- Tell me about a time you influenced without authority.
- Describe how you drive a cross-team initiative.
- What's the biggest improvement you brought to your team's processes?
- Tell me a time you owned a production incident from detection to RCA.
- How do you balance tech debt vs new features?
🟢 Conflict, Failure, Learning
- Tell me about a disagreement with your manager / peer. How did you resolve it?
- Describe a project that failed. What did you learn?
- Tell me about feedback you received that was hard to hear.
- A time when you missed a deadline — what happened, what did you change?
- A time you made a major production mistake — how did you recover?
- How do you handle a stakeholder who keeps changing scope?
- Tell me about a time you had to push back on a request.
- Describe a peer code review that turned into a conflict.
- How do you handle being on call?
- How do you handle stress / tight deadlines?
🟢 Scale, Impact, Growth
- Tell me about the biggest project you worked on by data volume / impact.
- How did you measure success of a pipeline you built?
- How have you saved cost / time / effort in past role?
- What is the most innovative thing you have built?
- Tell me about a time you simplified a complex process.
- What's your approach to continuous learning?
- What new tool did you introduce in your team — how did it go?
- How do you prioritise when everything is "P1"?
- What is your long-term career goal?
- Why are you leaving your current company?
🟢 HR & Closing
- Why do you want to join our company?
- What do you know about our team / product?
- Why should we hire you?
- Why this role vs your current job?
- What are your strengths and weaknesses (3 each, with examples)?
- What is your expected salary / current CTC / notice period?
- Are you interviewing elsewhere? What stage?
- How do you keep yourself updated on data engineering trends?
- What books / blogs / podcasts do you follow?
- Do you have any questions for us? (Always have 3 ready.)
3 Smart Questions to Ask the Interviewer:
1. What does success in this role look like in 6 months?
2. What is the biggest data engineering challenge the team is facing right now?
3. What does the data stack look like, and what are you considering changing?