# Data Engineering Interview Prep: Explain Shuffles, Delta MERGE and dbt Incremental Models With a Live Demo

> Struggling to explain projects in interviews? Practise the answers that come up most (shuffles, joins, skew, Delta MERGE, time travel, dbt incremental models) with demos you can run free.

Page: https://datautility.in/blog/data-engineering-interview-prep-spark-delta-dbt-hands-on
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Analyze & protect · data engineering interview questions, spark interview questions, delta lake interview questions, dbt interview questions, explain spark shuffle, data engineer interview prep

Interviewers ask "why", not "what": why a job is slow, why a MERGE duplicated rows, why a model is incremental. Answers land better when you have watched it happen. Here are the common questions, the short answer, and where to see it for yourself, free.

Open the tool: [Spark Lab](https://datautility.in/sparklab)

## Spark

- **What causes a shuffle?** Wide operations (groupBy, join, distinct, repartition) move data between partitions. In the Spark UI you see a new stage after each Exchange. Demo: Spark Lab lesson 3.

- **Broadcast vs sort-merge join?** A small table is copied to every executor (no shuffle of the big side); otherwise both sides are shuffled and sorted. Demo: lessons 4 and 5, compare the plans.

- **repartition vs coalesce?** repartition shuffles to any number of partitions; coalesce only merges, without a shuffle. Demo: lesson 7, count the tasks.

- **What is skew?** A few keys hold most rows, so a few tasks run much longer. In the Stages tab, compare max and median task time.

## Delta Lake

- **How is Delta ACID on files?** The _delta_log: each commit is a JSON file listing files added and removed. Demo: the Delta log panel in Spark Lab lesson D2.

- **What does MERGE do and when does it fail?** Update matches, insert the rest, in one commit; it fails if two source rows match one target row. Demo: lesson D4.

- **Time travel and restore?** Read versionAsOf; restoreToVersion adds a new commit. Demo: lesson D3.

## dbt

- **ref() vs source()?** ref() points to models and builds the DAG; source() to raw tables declared in YAML. Demo: dbt Lab lesson 3, Lineage tab.

- **When is a model incremental?** Large, append-mostly tables; `is_incremental()` filters new rows and `{{ this }}` is the existing table. Demo: Going further → Incremental models.

- **What is a snapshot?** Type 2 history: dbt_valid_from and dbt_valid_to per version of a row. Demo: Going further → Snapshots.

## Practise

Open the [Spark Lab](https://datautility.in/pyspark-spark-ui-lab) and the [dbt Lab](https://datautility.in/dbt-playground), run each demo, and say the answer out loud while pointing at the Spark UI, the Delta log or the dbt lineage.

## How to use the Spark Lab: step by step

1. Start the Spark Lab and the dbt Lab
2. Run each demo
3. Explain it out loud using the Spark UI, Delta log or lineage
4. Repeat with your own data

## When to use the Spark Lab

- Preparing for data engineer and analytics engineer interviews
- Explaining past projects with concrete examples
- Teaching juniors

## Also try

- [How to read the Spark UI](https://datautility.in/blog/read-the-spark-ui-jobs-stages-shuffle)
- [The Delta transaction log, explained](https://datautility.in/blog/delta-lake-transaction-log-explained)
- [dbt incremental models and snapshots](https://datautility.in/blog/dbt-incremental-models-and-snapshots-hands-on)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
