Spark • Delta Lake • Unity Catalog • Streaming • 2026

Databricks Interview Questions

🧱 20 questions 🧭 What each one tests, an answer frame, a spoken answer ⏱️ 24 min read

Databricks interviews for data engineers and platform roles go past notebook basics into how Spark actually runs a job, what Delta Lake adds, how governance works with Unity Catalog, and how you keep pipelines fast and affordable. The questions below are the ones that come up most, each with what the interviewer is testing, an answer frame and a short spoken answer.

Easy Fundamentals Practice Question

1. What is Databricks, and how does it relate to Apache Spark?

What the interviewer is really testing:
Whether you can separate the open-source engine from the managed platform.
Answer frame:

Spark: the open-source distributed compute engine for batch, streaming, SQL and ML.

Databricks: a managed platform built around Spark by its original creators; adds managed clusters, Delta Lake, Unity Catalog, notebooks, jobs, SQL warehouses and MLflow, on the major clouds.

Relationship: Databricks runs an optimised Spark runtime plus its own engine work, such as Photon.

Sample spoken answer:

"Spark is the open-source engine that distributes computation across a cluster. Databricks is the managed platform around it, created by the same people: it provisions and scales clusters, adds the Delta Lake storage layer, governance through Unity Catalog, collaborative notebooks, job orchestration, SQL warehouses and MLflow, and runs on the main cloud providers. So Spark is the engine; Databricks is the car built around it."

Red flag to avoid:

Using the two names interchangeably.

Easy Architecture Practice Question

2. Explain the lakehouse architecture.

What the interviewer is really testing:
Vocabulary and the reason the platform exists.
Answer frame:

Data lake: cheap object storage, open file formats, any data shape; weak on transactions, quality and performance.

Warehouse: transactions, schemas, governance, fast SQL; expensive and closed to unstructured data.

Lakehouse: keep data in open formats on object storage and add a transactional table layer, governance and a query engine so both BI and ML run on one copy.

Sample spoken answer:

"A data lake gives you cheap storage in open formats for any kind of data, but no transactions or reliable schemas. A warehouse gives you reliability and fast SQL but locks the data in and does not suit unstructured data or machine learning. The lakehouse keeps the data in open formats on object storage and adds a transactional table format, a catalog and fast engines on top, so analysts and data scientists work on the same copy."

Red flag to avoid:

Describing it as 'a data lake plus a warehouse side by side'.

Medium Delta Lake Practice Question

3. What is Delta Lake, and what does it add over plain Parquet files?

What the interviewer is really testing:
Core platform knowledge; the transaction log is the key idea.
Answer frame:

Format: Parquet data files plus a transaction log that records every commit as an ordered set of actions.

Adds: ACID transactions, schema enforcement and evolution, time travel, updates, deletes and merges, and unified batch and streaming reads and writes.

Why it matters: concurrent readers and writers see consistent snapshots; failed jobs leave no half-written tables.

Sample spoken answer:

"A Delta table is a folder of Parquet files with a transaction log next to them. The log is an ordered record of which files were added and removed in each commit, so readers see a consistent snapshot, writers get ACID guarantees, and a failed job cannot leave partial data visible. On top of that you get schema enforcement, time travel to earlier versions, real updates, deletes and merges, and the same table works as a streaming source and sink."

Red flag to avoid:

Saying Delta is a different file format from Parquet, or not mentioning the log.

Easy Architecture Practice Question

4. Explain the medallion architecture.

What the interviewer is really testing:
Standard pipeline layout on the platform.
Answer frame:

Bronze: raw data as ingested, append-only, with source metadata; the replayable record.

Silver: cleaned, deduplicated, typed and conformed; joined into business entities.

Gold: aggregated, business-level tables shaped for dashboards and features.

Sample spoken answer:

"Bronze holds data exactly as it arrived, with ingestion metadata, so you can always reprocess from it. Silver applies cleaning, deduplication, typing and joins, producing trustworthy entity tables. Gold holds the aggregates and business-level views that dashboards and models read. Each layer is a Delta table, and quality rules get stricter as you move up."

Red flag to avoid:

Putting business logic in bronze, or treating the layers as folder names with no rules.

Medium Spark Practice Question

5. How does Spark execute a job: driver, executors, jobs, stages and tasks?

What the interviewer is really testing:
Whether you can read the Spark UI and reason about performance.
Answer frame:

Lazy: transformations build a logical plan; an action triggers execution.

Planning: the driver optimises the plan and splits it into stages at shuffle boundaries; each stage becomes tasks, one per partition.

Running: executors run tasks in parallel; the driver schedules and collects results.

Sample spoken answer:

"Transformations are lazy: they only build a plan. When an action runs, the driver optimises that plan and cuts it into stages wherever data has to be shuffled between nodes. Each stage is split into tasks, one per partition, and the executors run those tasks in parallel while the driver schedules them and gathers results. That is why the number of partitions and the number of shuffles decide most of a job's performance."

Red flag to avoid:

Not knowing what a stage boundary is, or that transformations are lazy.

Medium Spark Practice Question

6. What is the difference between narrow and wide transformations, and why do shuffles matter?

What the interviewer is really testing:
The heart of Spark performance.
Answer frame:

Narrow: each output partition depends on one input partition, such as map and filter; no data movement.

Wide: output partitions need data from many input partitions, such as groupBy, join and distinct; requires a shuffle across the network and disk.

Cost: shuffles create stage boundaries, write intermediate data, and are where skew and spill show up.

Sample spoken answer:

"A narrow transformation like a filter works within a partition, so it pipelines with no data movement. A wide transformation like a group-by or a join needs rows with the same key on the same node, so Spark shuffles data across the cluster, writing it to disk and sending it over the network. Shuffles are the expensive part of almost every job, so I try to reduce them, broadcast small tables, and watch for skewed keys."

Red flag to avoid:

Not being able to name which operations cause a shuffle.

Medium Governance Practice Question

7. What is Unity Catalog, and what problems does it solve?

What the interviewer is really testing:
Whether you know how governance works across workspaces.
Answer frame:

What: a central catalog for data and AI assets with a three-level namespace of catalog, schema and object.

Solves: one place for permissions, audit and lineage across workspaces; managed and external tables; volumes for files; row filters and column masks; sharing.

Practice: grants on catalogs and schemas, service principals for jobs, lineage to trace a bad column upstream.

Sample spoken answer:

"Unity Catalog is the governance layer: every table, view, volume, function and model lives under catalog dot schema dot name, and permissions, audit logs and lineage are managed centrally across all workspaces. It replaced per-workspace metastores, so a grant is made once. It also gives fine-grained control like row filters and column masks, and lineage that shows exactly which jobs and columns fed a table when something looks wrong."

Red flag to avoid:

Confusing it with the legacy Hive metastore, or not knowing the three-level namespace.

Medium Delta Lake Practice Question

8. How does time travel work, and what does VACUUM do to it?

What the interviewer is really testing:
A favourite trick question about retention.
Answer frame:

Time travel: query a table as of a version or a timestamp; the log knows which files made up that snapshot.

VACUUM: physically deletes data files no longer referenced by the current version and older than the retention period.

Consequence: after VACUUM you cannot travel to versions whose files were removed; set retention to match your recovery needs.

Sample spoken answer:

"Because the log records which files belonged to every version, I can query the table as of a version number or a timestamp and Delta reconstructs that snapshot. VACUUM removes files that the current version no longer references and that are older than the retention window, to reclaim storage. The catch is that those files are exactly what old versions needed, so after a VACUUM, time travel beyond the retention window stops working. I set retention deliberately and never shorten it casually."

Red flag to avoid:

Thinking time travel is unlimited, or running VACUUM with a tiny retention on a shared table.

Hard Performance Practice Question

9. What do OPTIMIZE, Z-ORDER and liquid clustering do?

What the interviewer is really testing:
File layout knowledge that separates users from operators.
Answer frame:

OPTIMIZE: compacts many small files into fewer larger ones, which cuts file listing and read overhead.

Z-ORDER: co-locates rows with similar values of chosen columns in the same files, so statistics let queries skip files.

Liquid clustering: the newer approach that replaces partitioning plus Z-ORDER: clustering keys can change, layout is maintained incrementally, and it avoids over-partitioning.

Sample spoken answer:

"OPTIMIZE rewrites lots of small files into fewer big ones, which matters because streaming and frequent small writes create thousands of tiny files that slow every read. Z-ORDER goes further by sorting related values into the same files so the per-file statistics let the engine skip most of the table on filtered queries. Liquid clustering is the current recommendation: you declare clustering columns, the layout is maintained incrementally, you can change the keys later, and you avoid the small-partition problems of hard partitioning."

Red flag to avoid:

Partitioning by a high-cardinality column, or not knowing why small files hurt.

Medium Ingestion Practice Question

10. What is Auto Loader, and how is it different from a plain streaming file read?

What the interviewer is really testing:
Whether you know the standard way to ingest files at scale.
Answer frame:

Auto Loader: the cloudFiles source that incrementally discovers new files in cloud storage, tracks what it has processed in a checkpoint, and handles schema inference and evolution.

Discovery: directory listing or file notifications, so it scales to very large directories.

Versus plain streaming: the basic file source lists the whole directory each batch and has no schema evolution.

Sample spoken answer:

"Auto Loader is a streaming source for files landing in cloud storage. It remembers which files it has processed in its checkpoint, so each file is ingested exactly once, and it can discover new files through notifications instead of listing a huge directory every time. It infers the schema, can evolve it when new columns appear, and captures rows that do not fit. The plain file source re-lists everything and breaks on schema changes, so Auto Loader is the default for bronze ingestion."

Red flag to avoid:

Copying files with a scheduled batch job and deduplicating by hand.

Hard Streaming Practice Question

11. How does Structured Streaming achieve exactly-once processing, and what are triggers and checkpoints?

What the interviewer is really testing:
Depth on streaming semantics.
Answer frame:

Checkpoint: stores source offsets and state per micro-batch, so a restart resumes from the last committed batch.

Exactly once: replayable sources plus idempotent sinks; a Delta sink records the batch id in its commit so a replayed batch is skipped.

Triggers: processing-time intervals for continuous runs, available-now to process everything pending and stop, which suits scheduled incremental jobs.

Sample spoken answer:

"Structured Streaming processes data in micro-batches and writes the source offsets and any state to a checkpoint after each batch. If the job restarts it replays from the last committed offsets. Exactly-once comes from combining that replay with an idempotent sink: a Delta table records the batch id in its transaction, so if the same batch is replayed it is ignored. Triggers control cadence: a fixed interval for an always-on stream, or available-now to drain everything pending and stop, which lets me run a streaming pipeline as a cheap scheduled job."

Red flag to avoid:

Deleting the checkpoint to fix a problem, or not knowing why the sink must be idempotent.

Medium Pipelines Practice Question

12. What are declarative pipelines, formerly Delta Live Tables, and when would you use them?

What the interviewer is really testing:
Whether you know the managed pipeline option and its trade-offs.
Answer frame:

Idea: declare tables as streaming tables or materialised views with SQL or Python; the platform works out dependencies, orchestration, retries and infrastructure.

Quality: expectations declare rules per table and choose whether to warn, drop or fail on bad rows.

Use when: standard medallion pipelines where you want less operational code; avoid when you need custom control over execution.

Sample spoken answer:

"With declarative pipelines, the product previously called Delta Live Tables and now part of Lakeflow, I define each table as a query and mark it streaming or materialised, and the service builds the dependency graph, runs it, retries failures and manages compute. Expectations let me attach data-quality rules to a table and decide whether bad rows are logged, dropped or fail the run. I use it for the normal bronze-silver-gold shape because it removes a lot of orchestration code; for unusual processing I write regular jobs."

Red flag to avoid:

Not knowing expectations exist, or treating it as a scheduler.

Medium Compute Practice Question

13. Explain the compute options: all-purpose clusters, job clusters, serverless and Photon.

What the interviewer is really testing:
Cost and operational judgement.
Answer frame:

All-purpose: interactive clusters for notebooks and exploration; shared, long-running, dearer per hour.

Job clusters: created for a job run and terminated after; cheaper and isolated; the default for production.

Serverless: platform-managed compute that starts fast and scales without cluster configuration; Photon: the native vectorised engine that speeds up SQL and DataFrame work.

Sample spoken answer:

"All-purpose clusters are for people: notebooks, exploration, shared sessions. Production jobs should run on job clusters that spin up for the run and disappear after, which is cheaper and keeps runs isolated. Serverless removes cluster management entirely and starts in seconds, which suits SQL warehouses and many jobs. Photon is the vectorised execution engine that accelerates SQL and DataFrame operations, so I turn it on for SQL-heavy workloads and measure the difference."

Red flag to avoid:

Running scheduled production jobs on a shared all-purpose cluster.

Hard Performance Practice Question

14. A join is slow and one task runs far longer than the rest. What is happening, and how do you fix it?

What the interviewer is really testing:
Data skew diagnosis, the classic tuning question.
Answer frame:

Diagnosis: one partition holds far more rows for a hot key; the Spark UI shows one long task and spill to disk.

Fixes: adaptive query execution's skew join handling, broadcast the small side if it fits, salt the hot key to spread it, or pre-aggregate.

Also check: partition count, spill, and whether the table layout supports the filter.

Sample spoken answer:

"That pattern is skew: a few keys, like a null or a default customer id, hold most of the rows, so one task does most of the work and spills to disk. First I confirm it in the Spark UI by looking at task durations and shuffle sizes for that stage. Then, in order: make sure adaptive query execution is on so skewed partitions get split, broadcast the smaller table if it fits in memory, and if the big-to-big join is still skewed, salt the hot keys so they spread across partitions. I also check whether the null keys should be in the join at all."

Red flag to avoid:

Just adding more nodes, which does not help when one task holds the data.

Medium Delta Lake Practice Question

15. How do you do upserts and change data capture in Delta?

What the interviewer is really testing:
Everyday data engineering on the platform.
Answer frame:

MERGE INTO: match on keys, update matched rows, insert new ones, optionally delete rows missing from the source.

Change Data Feed: enable it on a table to read row-level changes between versions for downstream incremental processing.

Slowly changing dimensions: type one overwrites; type two closes the old row and inserts a new one with validity dates; declarative pipelines have a built-in apply-changes step.

Sample spoken answer:

"For upserts I use MERGE INTO with the business key: update rows that match, insert the ones that do not, and delete or expire rows that disappeared if the source is a full snapshot. To propagate changes downstream I enable the change data feed on the table, which lets the next stage read only the inserts, updates and deletes since the last version it processed. For history I keep type-two dimensions with start and end dates, and in declarative pipelines the apply-changes step does that for me."

Red flag to avoid:

Overwriting whole tables every run, or deduplicating with full-table joins instead of MERGE.

Medium Spark Practice Question

16. When do you cache a DataFrame, and what is the difference from the disk cache?

What the interviewer is really testing:
Whether you use caching deliberately.
Answer frame:

DataFrame cache: cache or persist keeps a computed result in executor memory or disk; lazy until the next action; worth it when the same result is reused several times.

Disk cache: Databricks automatically caches remote Parquet and Delta file reads on local SSD; transparent, no code.

Discipline: unpersist when done; caching a large one-off result can evict useful data and slow everything.

Sample spoken answer:

"I cache a DataFrame only when I will reuse that exact result more than once in the job, for example a cleaned table that feeds three aggregations; it is materialised on the next action and lives in executor memory or spills to disk. Separately, the platform's disk cache keeps copies of remote files on the node's local SSD automatically, which speeds repeated reads with no code. And I unpersist when I am done, because an unused cache is just memory taken from shuffles."

Red flag to avoid:

Caching everything by reflex, or not knowing cache is lazy.

Easy SQL Practice Question

17. What is a SQL warehouse, and when do you use it instead of a cluster?

What the interviewer is really testing:
Knowing the right compute for BI workloads.
Answer frame:

SQL warehouse: compute dedicated to SQL queries and BI tools, with Photon and result caching; serverless versions start quickly.

Use for: dashboards, ad-hoc analyst queries, BI connections; not for Python pipelines.

Clusters: for notebooks, ETL code and ML.

Sample spoken answer:

"A SQL warehouse is compute purpose-built for SQL: analysts and BI tools connect to it, it runs Photon, caches results, and the serverless option starts in seconds and scales with concurrency. I point dashboards and ad-hoc SQL at a warehouse and keep clusters for engineering and ML work in notebooks and jobs, so BI traffic never competes with a pipeline."

Red flag to avoid:

Pointing a BI tool at an all-purpose cluster.

Medium Orchestration Practice Question

18. How do you orchestrate pipelines with Workflows, and how do you pass parameters?

What the interviewer is really testing:
Production habits.
Answer frame:

Jobs: a job is a graph of tasks, such as notebooks, Python scripts, SQL, pipelines or dbt, with dependencies, retries and alerts.

Parameters: job-level parameters and task values pass dates, environments and ids between tasks; notebooks read them as widgets.

Triggers: schedules, file-arrival triggers and API calls; run as a service principal with least privilege.

Sample spoken answer:

"I build a job as a graph of tasks with explicit dependencies, so the silver step runs only after bronze succeeds, with retries on transient failures and alerts on failure. Parameters like the run date and the target environment are defined on the job and read inside each task, and tasks can hand values to downstream tasks. Jobs run under a service principal with only the grants they need, and they use job clusters or serverless rather than a shared cluster."

Red flag to avoid:

Chaining notebooks by hand inside one notebook, or running jobs under a personal account.

Medium Machine Learning Practice Question

19. How does MLflow fit into Databricks?

What the interviewer is really testing:
Whether you know the ML lifecycle tools on the platform.
Answer frame:

Tracking: experiments and runs record parameters, metrics and artefacts; autologging captures most frameworks.

Registry: models are registered in Unity Catalog with versions, aliases and permissions.

Serving: registered models deploy to model serving endpoints; lineage connects training data to the model.

Sample spoken answer:

"MLflow is built in. Training runs log parameters, metrics and artefacts to an experiment, mostly automatically through autologging. When a model is good I register it in Unity Catalog, where it gets versions and aliases like champion and challenger, and the same permissions model as tables. From there it can be deployed to a serving endpoint, and lineage shows which tables trained it, which is what makes audits possible."

Red flag to avoid:

Saving model files to random storage paths and tracking them in a spreadsheet.

Medium Cost Practice Question

20. A Databricks bill is too high. What do you check first?

What the interviewer is really testing:
Cost awareness, a common question for senior roles.
Answer frame:

Compute habits: idle all-purpose clusters with no auto-termination, jobs on shared clusters, oversized fixed clusters.

Job efficiency: shuffles and spill in the Spark UI, small files, missing data skipping, recomputing full tables instead of incremental loads.

Tooling: system billing tables to see cost by job and user; autoscaling, spot instances, serverless where it fits.

Sample spoken answer:

"I start with the billing system tables to see which jobs, clusters and users the spend comes from, because it is usually a few things. Then the common culprits: interactive clusters left running without auto-termination, production jobs on shared clusters instead of job clusters, and clusters sized for peak all day. After that I look inside the top jobs for wasted work, like full reloads that should be incremental, small-file bloat and skewed shuffles. Fixing habits usually saves more than tuning code."

Red flag to avoid:

Jumping to code tuning before looking at idle compute.

Undetectable AI for live interviews

Crack your Databricks interview, no matter how tough

Databricks interviews jump from 'explain the medallion layers' to 'why did this join spill' to 'what does VACUUM break' in the same ten minutes. The follow-ups are where candidates stall, and the frame has to be ready before the pause gets long.

ClapAssist is your silent co-pilot. Runs natively on macOS and Windows, listens to the interviewer's exact question, and surfaces concise talking points right next to your camera eye-line. Excluded at the OS level from Zoom, Google Meet, and Teams screen sharing.

Download ClapAssist with 10 Free Minutes →
Mac & Windows · Completely undetectable to interviewers · No credit card required