#Deep-Dive Q&A Bank
150 rapid-fire questions with the answer you should give β crisp, then stop. Over-answering is the most common technical-round failure; say the sharp version, then let them ask for depth.
How to drill: cover the answers. Say yours out loud. Compare. Mark anything you fumbled and revisit tomorrow. Do not read this passively β it will feel productive and change nothing.
#Spark execution (1β30)
- Job vs stage vs task? A job is one action; stages are bounded by shuffle boundaries; a task is one partition's work in one slot.
- What creates a stage boundary? A wide dependency β a shuffle.
- Name five shuffling operations.
groupBy,join(non-broadcast),distinct,repartition, window functions,orderBy. repartitionvscoalesce?repartitionshuffles and can increase or decrease partitions evenly;coalesceonly reduces, without a full shuffle, and can leave uneven partitions.- Four phases of Catalyst? Parse β analyse (catalog resolution) β optimise (rule-based, then cost-based) β physical planning and code generation.
- What does the analyser do that the parser doesn't? Resolves names against the catalog: tables, columns, types, functions.
- Name five logical optimisations. Predicate pushdown, column pruning, constant folding, boolean simplification, limit pushdown.
- What is whole-stage codegen? Fusing the operators of a stage into one generated JVM method to eliminate virtual calls and keep values in registers.
- How do you see codegen in a plan? Operators marked with
*and a codegen stage id; an operator without it fell out of codegen. - What is Tungsten? The memory/CPU efficiency layer: binary
UnsafeRowformat, managed memory, cache-aware algorithms, codegen. - What does AQE do? Coalesces shuffle partitions, switches join strategies at runtime, and splits skewed partitions.
- Why does AQE need a shuffle? The shuffle write is the first point with ground-truth statistics rather than estimates.
- What can AQE not fix? Anything before the first shuffle, a fundamentally wrong plan, or bad data layout.
- What is DPP? Dynamic partition pruning β pushing a dimension's filtered key set down to prune fact-table partitions at runtime.
- Three join strategies and when each? Broadcast hash (one small side), shuffle hash (smaller side fits per partition), sort-merge (two large sides; the robust default).
- How does a broadcast join fail? The "small" side isn't β driver OOM collecting it, or executor memory blown holding copies.
- When do you get a broadcast nested loop join? No equi-join condition. Usually a query bug.
- What is CBO and what does it need? Cost-based optimisation for join order and strategy; it needs fresh table and column statistics.
- Execution vs storage memory? They share one region and borrow from each other; execution can evict borrowed storage, but not vice versa.
- What is spill? Execution memory exhausted, so intermediate data is written to local disk. A slowdown, not an error.
- Where do you see spill? Spill (memory) and spill (disk) columns in the stage's task metrics.
- How do you detect skew? Max task duration or shuffle read far above the median in the slow stage β roughly 5β10Γ+.
- Four skew remedies in order? AQE skew handling β filter junk keys β broadcast the small side β salt the hot keys.
- What is salting? Appending a random suffix to the hot key and fanning out the other side into one copy per salt value, so the hot key spreads across tasks.
- When would you not salt? When AQE already handles it, when you can broadcast, or when filtering a junk key fixes it β salting adds real complexity.
- Why is
collect()dangerous? It materialises the whole result in driver memory. - What is Photon? A vectorised C++ execution engine using columnar batches and SIMD, replacing JVM execution for supported operators.
- When does Photon not help? UDF-heavy Python/Scala workloads, and anywhere execution isn't the bottleneck β and it bills at a higher rate.
- What happens to unsupported operators under Photon? They fall back to the Spark engine; a query can be partly Photon.
- What is Spark Connect? A client/server split where the client sends unresolved logical plans over gRPC β what makes thin clients and serverless practical.
#Delta Lake (31β60)
- What is a Delta table physically? Parquet data files plus a
_delta_logthat defines which files are in the table. - Why checkpoints? So readers don't replay every commit from zero; they read the latest checkpoint plus subsequent JSON commits.
- Name six log actions.
metaData,add,remove,protocol,commitInfo,txn,cdc,domainMetadata. - What's in an
addaction beyond the path? Per-file statistics β row count, per-column min/max and null counts. - Why does Delta avoid
LISTon object storage? The file set is metadata in the log, so no directory scan is needed. - How does Delta achieve atomicity? A commit succeeds only if it can create version N+1 that doesn't already exist β put-if-absent.
- Explain OCC on conflict. The loser re-reads the new snapshot, checks whether the conflict is semantic, and retries or fails.
- WriteSerializable vs Serializable? WriteSerializable (default) allows some concurrent appends to be reordered relative to each other; Serializable is strict. Readers always get snapshot isolation.
- How do you reduce write conflicts? Disjoin writers across files/partitions, make merge conditions prunable, use idempotent streaming writes.
- What is data skipping? Using per-file min/max statistics to eliminate files without reading them.
- Why might skipping not work? Filter columns outside the indexed statistics set, or a layout where every file's range spans everything.
- Z-order vs liquid clustering? Z-order interleaves keys into a space-filling curve and requires a full rewrite with fixed keys; liquid clusters incrementally and lets keys evolve.
- When would you still partition? Hard physical separation β residency, partition-level retention, or an external engine depending on the layout.
- What's the over-partitioning failure mode? High-cardinality partition columns producing masses of tiny files; metadata and task overhead swamp any pruning.
- What are deletion vectors? A bitmap marking logically deleted rows so a small delete doesn't rewrite the whole file β merge-on-read.
- What new maintenance do deletion vectors create? Vectors accumulate and degrade reads;
OPTIMIZE/REORG ... PURGEmaterialises them. - What is Change Data Feed? Row-level change records with
_change_type, commit version and timestamp, readable by range. - What bounds time travel? Log retention (history) and deleted-file retention (data files), and
VACUUMenforcing the latter. - What does
VACUUMactually delete? Tombstoned data files past the retention threshold β the one Delta operation that destroys data. - Why is there a safety check on short VACUUM retention? A long-running reader may still be reading an old snapshot.
- What is column mapping for? Decoupling logical from physical column names, enabling rename/drop and special characters without a rewrite.
- Shallow vs deep clone? Shallow copies metadata and references source files (instant, great for test environments); deep copies data too (the DR building block).
- What are table features? Discrete capabilities a table declares (deletion vectors, liquid clustering, row tracking) with minimum reader/writer requirements.
- Risk of enabling a table feature? Older clients and external engines may no longer be able to read the table.
- What is UniForm? Exposing Iceberg (and Hudi) metadata over the same Parquet files so other engines read a Delta table without copying.
- What does Iceberg v3 add? Deletion vectors, row lineage and the
VARIANTtype β closing the gap with Delta and enabling shared Parquet files. - Delta or Iceberg β how do you answer? Increasingly a catalog question, not a format one; pick what your engines read natively and invest in governance.
- What is
VARIANTfor? Semi-structured data in an open binary format that's navigable without string parsing. - What is Predictive Optimization? Automatic
OPTIMIZE/VACUUM/statistics maintenance on managed tables, driven by usage. - Why do idempotent streaming writes matter?
txnAppId/txnVersionlet a retried batch be recognised and not double-applied.
#Unity Catalog and governance (61β85)
- Three-level namespace?
catalog.schema.object. - How many metastores? One per region; a workspace attaches to exactly one.
- Where does identity live? At the account level β users, groups, service principals via SCIM, federated into workspaces.
- Why doesn't
SELECTalone work? You also needUSE CATALOGandUSE SCHEMAto traverse to the object. - Managed vs external tables? Managed: UC controls storage, drop removes data, predictive optimisation applies. External: you control the path.
- Default recommendation? Managed, for the automatic maintenance and simpler governance.
- What is a storage credential? A cloud IAM identity Databricks assumes; combined with a path it forms an external location, which is the grantable unit.
- Do users ever handle cloud keys? No β UC vends short-lived scoped credentials at query time.
- Row filter vs dynamic view? A row filter attaches to the table, so it applies however the table is reached; a view only protects consumers who use the view.
- What is a column mask? A UC function transforming a column value based on who is asking.
- What is ABAC and why does it scale? Policies written against tags rather than objects β governance becomes O(policies) instead of O(objects Γ groups), and new data inherits it.
- Who should own production tables? Groups, never individuals β individually-owned tables are orphaned when someone leaves.
- What is workspace-catalog binding? Restricting which workspaces may attach a catalog β how one metastore stays safe across environments.
- What lineage does UC capture? Table and column level automatically, across notebooks, jobs, pipelines, dashboards, and models.
- Name four system tables. Billing/usage, access audit, query history, lineage, compute.
- How do you prove who read a PII table last quarter? Query
system.access.audit. - What is Delta Sharing? An open protocol for live data sharing without copying, to Databricks or any client implementing it.
- What is OpenSharing? The 2026 Linux Foundation-hosted evolution extending Delta Sharing to AI assets, Iceberg REST clients and on-prem sources.
- What is a clean room? Approved computation across multiple parties' data without either seeing the other's raw rows.
- What is Lakehouse Federation? Querying external systems in place via connections and foreign catalogs, governed by UC.
- When is federation a trap? High-volume analytical workloads β you inherit the source's performance and load its operational database.
- What are Unity Catalog Metrics? Governed, reusable KPI definitions queryable from SQL, BI, APIs and agents β the fix for inconsistent metric definitions.
- What are Domains? Business-aligned grouping of assets, which also scopes agent context retrieval.
- Biggest risk in a Hive-to-UC migration? Compute access-mode remediation on older jobs β and lifting legacy ACLs instead of redesigning permissions.
- When is a UC migration actually complete? When direct storage access is removed so the old path can't be used β governance that can be bypassed isn't governance.
#Architecture and topology (86β105)
- Control plane vs compute plane? Control plane orchestrates (web app, APIs, scheduler, metastore service); compute plane runs the work and touches your data.
- Where is your data? In your cloud storage account, always.
- Classic vs serverless compute plane? Classic runs in your cloud account/VPC; serverless runs in Databricks' with NCC, egress control and private connectivity as the controls.
- One workspace per team β good idea? Usually not by default; each is recurring operational cost. Split on genuine administrative, regulatory or cost boundaries.
- What forces a second metastore? A second region, or a hard isolation requirement you're willing to pay for in lost lineage and sharing.
- Medallion layers? Bronze raw/append, silver conformed and quality-enforced, gold business-level.
- When are three layers wrong? Small or already-clean sources β you pay three times to move a lookup table.
- What belongs in bronze metadata? Source file/offset, ingestion timestamp, batch id β so you can always reprocess and audit.
- How do you promote to production? Databricks Asset Bundles from Git via CI, deployed by a service principal, with catalog supplied per target. Code and config promote; data does not.
- How do you make realistic dev data? Shallow clone from production into a dev catalog β instant, no storage copy β subject to masking of sensitive data.
- What's not covered by storage replication in DR? The metastore, workspace configuration, identity/secrets, and orchestration/checkpoint state.
- Most common DR mistake? A runbook of UI clicks instead of infrastructure as code β and never rehearsing it.
- Sensible default DR posture for analytics? Pilot light with a genuinely rehearsed restore, rather than a paper active/active.
- How does data mesh map to UC? Catalog per domain, central paved road, federated governance via account groups and tag policies.
- Why does mesh usually fail? Domains without their own engineers or budget β you get the central team with more meetings.
- What's the unit of cost attribution? Tags on clusters, warehouses and jobs flowing into billing system tables.
- When should tagging be designed? Before the first workspace. Retrofitting tags across an estate is miserable.
- What is a cluster policy? A constraint template on compute β instance types, auto-termination, tags, runtime β making good behaviour the default.
- Why are policies both cost and security controls? The same mechanism enforces tagging and auto-termination as enforces runtime versions and instance families.
- What's the spine of an enterprise design? Governance. Narrate it first; ingest and layers follow.
#Pipelines and streaming (106β125)
- What is Auto Loader? Incremental file ingestion with durable tracking of processed files, schema inference/evolution, and exactly-once semantics.
- Why not just list the directory? Listing cost grows with directory size, not with new data.
- Auto Loader's two discovery modes? Directory listing and file notification (cloud events) for very large directories.
- Streaming table vs materialized view? Streaming table incrementally ingests append-only sources; a materialized view keeps a query's results fresh.
- Three expectation behaviours? Warn (track only), drop row, fail the update.
- How do you do SCD2 without a MERGE?
AUTO CDC/APPLY CHANGESdeclaratively, with a sequencing column for out-of-order events. - 200 CDC tables β how do you build it? Metadata-driven: one parameterised pipeline over a control table, not 200 hand-built pipelines.
- What's required for end-to-end exactly-once? A replayable source plus an idempotent or transactional sink, with offsets tracked in the checkpoint.
- Is that exactly-once delivery? No β exactly-once effect on the sink.
- What's in a streaming checkpoint? Source offsets, a write-ahead log of planned batches, and stateful operator state.
- What does a watermark do? Bounds how late data may be, letting Spark evict old state and emit final results.
- What happens without one? State grows without limit and the job degrades until it dies.
- Why RocksDB for state? Keeps large state off the JVM heap, avoiding GC pressure at scale.
- What is the
AvailableNowtrigger? Process everything available, then stop β streaming's bookkeeping with batch economics. - Why is it under-used? Most "we need streaming" requirements are actually incremental batch.
- Question to ask before agreeing to "real-time"? What decision is made on this data, and does 5 seconds versus 5 minutes change it?
- Small files in streaming β cause and fix? Short triggers writing frequently; fix with longer triggers, optimised writes/auto-compaction, or
AvailableNow. - Danger after a backlog? An unbounded first batch β always bound
maxOffsetsPerTrigger/maxFilesPerTrigger. - Keep Airflow or use Lakeflow Jobs? Keep Airflow if it's the enterprise conductor across many systems; use native jobs if the work lives in Databricks.
- Four layers of data quality? Schema enforcement, declarative expectations, monitoring/drift detection, and producer contracts.
#Performance and cost (126β140)
- First question when a job slows down? What changed β code, data volume, runtime, cluster config, upstream schema?
- Second? Where is the time β one dominant stage or spread across many?
- Most useful single number? Max Γ· median task duration in the slowest stage.
- Second most useful? Bytes read versus bytes actually needed.
- How do you separate a data problem from a code problem? Re-run the current code against a pinned prior version using time travel.
- Dashboard slow, doubling the warehouse barely helped β meaning? It's I/O and layout bound, not compute bound.
- Why is MERGE slow? Non-prunable merge condition, no deletion vectors, undeduplicated source, non-broadcastable source, or layout not aligned to the merge key.
- Six steps of the optimisation hierarchy? Do less work β read less data β shuffle less β fix distribution β faster engine β more hardware.
- Why is "add nodes" last? It always costs more and often fixes nothing β a skewed job gets more expensive and equally slow.
- Biggest single enterprise cost finding? Scheduled work running on all-purpose (interactive) compute.
- Second biggest? Idle interactive clusters with no or long auto-termination.
- How do you answer a cost question credibly? With system-table evidence, broken down by team, workload and SKU β not opinion.
- What should you optimise, total cost or cost per workload? Cost per workload. Rising total with falling unit cost is a successful platform.
- How do you make cost self-regulating? Attribute it. Tagged, showback-visible spend makes teams optimise without policing.
- Target file size after compaction? Roughly 128 MBβ1 GB, auto-tuned by table size.
#AI, security and judgement (141β150)
- Why the lakehouse for AI? The differentiator is governed context and runtime controls, not the model β everyone has the same models.
- RAG answers are bad β first check? Retrieval, not the prompt: was the correct chunk even in the retrieved set?
- Five things that determine RAG quality? Chunking, retrieval quality measured, permission-aware filtering, evaluation, grounding with citations.
- Unity Catalog vs Unity AI Gateway? UC governs assets (who may use this model/tool/table); the Gateway governs interactions at runtime β spend, routing, policies, guardrails, tracing.
- How do you stop agent spend running away? Gateway cost attribution with hard caps and smart routing, from day one rather than retrofitted.
- When is fine-tuning justified? When the gap is behaviour or format, not knowledge β and only after a measured RAG baseline.
- CISO says serverless leaves their VPC β response? Data stays in their storage; controls move to network connectivity configurations, serverless egress control and private connectivity.
- How do you satisfy GDPR erasure? The delete is cheap with deletion vectors; the hard part is enumerating every copy, which is a governance problem.
- When would you not recommend Databricks? Small data with simple BI and no AI roadmap, pure OLTP, or an organisation with no capacity to own a platform.
- What do you say when you don't know? "I don't know that specifically β here's how I'd reason about it and how I'd verify." Then reason well.