Databricks interview questions and answers: Spark, Delta Lake, streaming and Unity Catalog
Quick answer: Databricks interview questions for data engineers, analytics engineers and Solutions Architects cluster around five areas: Spark execution (lazy evaluation, shuffles, joins, skew), Delta Lake (ACID, time travel, MERGE, VACUUM, clustering), ingestion and streaming (Auto Loader, Structured Streaming, checkpoints), governance (Unity Catalog) and lakehouse design (the medallion architecture). Below are 22 questions with concise answers, checked against the Databricks documentation and the Apache Spark performance tuning guide on 5 December 2026. If you are preparing for the online assessment rather than the platform questions, read our Databricks CodeSignal assessment guide first.
On this page
Who gets these questions
Companies that run on Databricks ask them in data engineering, analytics engineering, ML engineering and platform roles; Databricks itself asks them of Solutions Architects and field engineers, alongside coding and SQL rounds. Expect a mix: short definitions ("what is a Delta table?"), debugging scenarios ("this job got slow after the data doubled") and a design question ("build a pipeline from raw files to a dashboard"). The general data-engineering foundations are in our data engineer interview questions and SQL interview questions.
Spark fundamentals
1. What does lazy evaluation mean in Spark?
Transformations such as select, filter or join only build a plan; nothing runs until an action such as count, collect or a write. The Spark programming guide states that all transformations are lazy. This lets the optimizer combine steps and push filters down — and it explains why an error can surface at the action, far from the line that caused it.
2. What is a shuffle and why is it expensive?
A shuffle redistributes data across the cluster so that rows with the same key end up together. Operations such as joins, groupByKey, reduceByKey and repartition trigger one. It costs disk I/O, serialization and network transfer, and it creates a stage boundary. Reducing data before a shuffle (filtering and selecting only needed columns early) is the first optimization to mention.
3. When does Spark use a broadcast join?
When one side of a join is small enough to copy to every worker, Spark can avoid shuffling the large side. The Spark tuning guide sets the default spark.sql.autoBroadcastJoinThreshold at 10 MB; you can also hint a broadcast explicitly. The risk is broadcasting a table that is larger than you think and running out of memory on the executors.
4. What is data skew and how do you handle it?
Skew means a few keys hold most of the rows, so a few tasks run far longer than the rest. Signs: one straggler task in the Spark UI, or a stage stuck at 199 of 200 tasks. Options: let Adaptive Query Execution split skewed partitions, broadcast the small side, salt the hot key, or pre-aggregate before the join.
5. What does Adaptive Query Execution do?
AQE re-optimizes the query plan at runtime using statistics from completed stages. Per the Spark documentation it is enabled by default since Spark 3.2.0, and it can coalesce small shuffle partitions, switch join strategies and handle skew in sort-merge joins. In an answer, mention that it reduces the need to hand-tune spark.sql.shuffle.partitions but does not fix a bad data model.
6. repartition or coalesce?
repartition(n) performs a full shuffle and can increase or decrease the number of partitions, producing evenly sized ones. coalesce(n) only merges existing partitions to reduce their number without a full shuffle, which is cheaper but can leave partitions uneven. A common use of coalesce is reducing the number of output files before a write.
Delta Lake
7. What is Delta Lake and what does it add to Parquet files?
Delta Lake is the storage layer behind Databricks tables. The data is Parquet, plus a transaction log that records every change, which gives ACID transactions, schema enforcement, time travel and efficient upserts. In an interview, contrast it with a plain folder of Parquet files where two concurrent writers or a half-finished job can leave the table inconsistent.
8. How does time travel work?
Each write creates a new table version. You can query an older one with VERSION AS OF or TIMESTAMP AS OF and list versions with DESCRIBE HISTORY, as described in the table history documentation. Typical uses: auditing, reproducing a report, or rolling back a bad write with RESTORE.
9. What does VACUUM do, and what is the catch?
VACUUM deletes data files that are no longer referenced by the current table state and are older than the retention threshold — 7 days by default, controlled by delta.deletedFileRetentionDuration. The catch: after vacuuming, you can no longer time travel to versions older than that threshold. Lowering the retention to save storage trades away recovery options.
10. How do you implement an upsert?
Use MERGE INTO: match source rows to the target on a key, UPDATE when matched and INSERT when not matched, optionally DELETE for tombstones. Two follow-ups interviewers like: deduplicate the source first (a merge fails or misbehaves when several source rows match one target row), and make the job idempotent so a retry does not double-apply changes.
11. Partitioning, Z-order or liquid clustering?
Partitioning splits files by a column's values and works for low-cardinality columns such as date; over-partitioning creates many small files. Z-ordering, run with OPTIMIZE, co-locates related values for data skipping. For new tables, the Databricks clustering documentation recommends liquid clustering, which replaces partitioning and ZORDER and lets you change clustering keys without rewriting the table; it cannot be combined with them on the same table.
12. What causes the small-files problem and how do you fix it?
Frequent small appends, streaming micro-batches and over-partitioning create thousands of tiny files, so reads spend their time opening files and reading metadata. Fixes: run OPTIMIZE or enable auto compaction, write in larger batches, avoid partitioning on high-cardinality columns, and prefer liquid clustering for new tables.
13. What is Change Data Feed?
Change Data Feed records row-level inserts, updates and deletes between versions so downstream jobs can process only what changed instead of rescanning the table. The classic form is enabled with the table property delta.enableChangeDataFeed = true; the documentation also describes a newer automatic mode on recent runtimes, so check which one your workspace uses.
Ingestion and streaming
14. What is Auto Loader?
Auto Loader incrementally ingests new files from cloud storage through a Structured Streaming source called cloudFiles. It tracks which files were processed, so you do not reprocess the whole directory on each run, and it can infer and evolve schemas. It is the usual answer to "how do you load files landing in S3 or ADLS every few minutes?"
15. How does Structured Streaming recover after a failure?
Through the checkpoint location: Spark stores offsets and state there, so a restarted query resumes where it stopped. The Structured Streaming guide describes end-to-end exactly-once guarantees built on checkpointing and write-ahead logs, which in practice also requires a sink that handles replays safely, such as a Delta table. Never share one checkpoint between two queries, and do not delete it casually — that resets progress.
16. Batch or streaming for a new pipeline?
Start from the freshness requirement and cost. If the business needs data hourly or daily, a scheduled incremental batch is simpler to operate. If it needs minutes or seconds, use streaming — and remember that Structured Streaming with an availableNow trigger lets the same code run as an incremental batch, which is a good compromise to mention.
17. What are Lakeflow (formerly Delta Live Tables) pipelines?
Databricks' declarative pipeline framework: you define tables and their dependencies, and the platform manages orchestration, retries and infrastructure. The documentation now calls them Lakeflow pipelines built on Apache Spark Declarative Pipelines; you will still hear the older name "Delta Live Tables" in interviews. Data-quality rules (expectations) are a frequent follow-up — explain what should happen to bad rows: keep and flag, drop, or fail the update.
Governance and platform
18. What is Unity Catalog?
Unity Catalog is the governance layer for data and AI assets across workspaces. Objects use a three-level namespace, catalog.schema.object, and permissions are granted on those objects; it also provides lineage and auditing. A good answer explains why centralized grants beat per-workspace access controls once you have several teams.
19. What is Photon and when does it not help?
Photon is Databricks' native vectorized query engine, compatible with Spark APIs, and it speeds up SQL and DataFrame workloads. It does not accelerate everything: the documentation lists UDFs, RDD and Dataset APIs among unsupported features, so a pipeline dominated by Python UDFs will not see much benefit.
20. All-purpose compute or job compute?
All-purpose clusters are for interactive notebooks and are shared by people; job compute is created for a scheduled job and terminated afterwards, which is cheaper and isolates production runs. A strong answer adds autoscaling, auto-termination and cluster policies as cost controls.
Design and scenario questions
21. Explain the medallion architecture.
Bronze holds raw data as ingested, silver holds cleaned and validated data, and gold holds enriched, business-level tables and aggregates for reporting, per the Databricks medallion guide, which calls it a recommended pattern rather than a requirement. In an interview, say what checks happen at each hop and why keeping bronze lets you rebuild silver after a bug.
22. A daily job that took 20 minutes now takes 3 hours. How do you debug it?
Open the Spark UI and find the slow stage: is it one straggler task (skew), a huge shuffle (a join that lost its broadcast or a missing filter), spill to disk (too little memory per task), or thousands of tiny tasks (small files)? Check whether input volume changed, compare the query plan with an older run, and confirm that table maintenance such as OPTIMIZE still runs. Fix the cause, then add a metric or alert so the regression is caught next time.
For system-level design rounds, structure the answer with our system design framework; for coding rounds in Python, see Python interview questions.
How to prepare in a week
- Day 1–2: Spark execution — read a query plan, find a shuffle, explain a broadcast join and skew.
- Day 3: Delta Lake — create a table, MERGE into it, time travel, run OPTIMIZE and VACUUM on a test table.
- Day 4: ingestion — an Auto Loader stream into bronze, then a silver table with quality rules.
- Day 5: governance — Unity Catalog namespace, grants and lineage.
- Day 6–7: mock interviews: one debugging scenario and one end-to-end design, explained out loud.
Ask the recruiter which tools are permitted during live rounds; documentation and AI assistants are company-specific policy decisions.
Sources
- Databricks — Work with table history (time travel)
- Databricks — VACUUM
- Databricks — MERGE INTO
- Databricks — Use liquid clustering for tables
- Databricks — Change data feed
- Databricks — What is Auto Loader?
- Databricks — Lakeflow pipelines
- Databricks — What is Unity Catalog?
- Databricks — What is Photon?
- Databricks — What is the medallion lakehouse architecture?
- Delta Lake — Introduction
- Apache Spark — RDD programming guide (lazy transformations, shuffles)
- Apache Spark — Performance tuning (broadcast threshold, AQE)
- Apache Spark — Structured Streaming programming guide
Checked 5 December 2026. Product names and defaults change between Databricks Runtime versions; your workspace documentation is authoritative.
FAQ
What questions are asked in a Databricks interview?
Expect Spark execution (lazy evaluation, shuffles, broadcast joins, skew, AQE), Delta Lake (ACID, time travel, MERGE, VACUUM, OPTIMIZE and liquid clustering), ingestion and streaming (Auto Loader, Structured Streaming checkpoints), Unity Catalog governance, and a design question built on the medallion architecture.
Is the Databricks interview hard?
It is practical rather than trivia-based. The harder part is usually the scenario questions — debugging a slow job or designing a pipeline end to end — where you have to explain trade-offs, not just definitions.
Does Databricks use CodeSignal?
Candidate reports describe a CodeSignal coding assessment early in some Databricks pipelines, but Databricks does not publish this on its main careers pages; follow your recruiter’s invitation. See our Databricks CodeSignal assessment guide for details.
What is the difference between Delta Lake and Parquet?
Delta Lake stores data as Parquet files plus a transaction log. The log adds ACID transactions, schema enforcement, time travel and MERGE-based upserts that a plain folder of Parquet files does not have.
Should I learn PySpark or Spark SQL for a Databricks interview?
Both appear. Be comfortable writing joins, window functions and aggregations in SQL, and the same transformations with the DataFrame API in PySpark, and be able to explain what the query plan does.
More guides
Related articles
Read next
Use cases
Interview Copilot is a desktop app
It's a desktop app for macOS, Windows and Linux — a phone cannot capture the interviewer's audio or hide a window from screen share. Open this page on your computer to install it.
And during the interview this phone can be your screen: scan the QR code in the laptop app and the answers appear right here. How phone mode works →