Fabric Data Engineering Interview Questions
40 practitioner-level questions across Spark compute, Notebooks, optimization, Lakehouse architecture, and troubleshooting. Verified against Runtime 1.3 / Runtime 2.0 documentation, FabCon 2026, and the June 2026 Feature Summary.
spark.conf.set("spark.native.enabled", "true")Measure the slow stage and check whether native execution applies. Inspect Spark Advisor and the physical plan for native operators or JVM fallback. Benchmark the engine on representative queries alongside partition, join, and file-layout changes; its benefit depends on operator coverage and the workload bottleneck.
Senior DE interviews test production debugging over syntax knowledge. Highest signal questions: the Native Execution Engine and when it falls back to JVM, the Runtime 1.3 vs Runtime 2.0 differences, Autoscale Billing vs capacity billing for Spark, Liquid Clustering vs Z-Order for write-heavy tables, and the correct OOM diagnosis flow (Driver vs Executor). Know that Runtime 1.2 was deprecated March 31 2026 — mentioning this unprompted signals you actively track the platform.
Spark Compute & Pools
How Fabric allocates compute — cost implications, cold start behavior, and the 2025 Autoscale Billing model that changes how you size production workloads.
Q1
Starter pools use Microsoft-managed prewarmed Spark capacity. With default settings and no extra libraries, startup typically takes 5–10 seconds, but warm capacity is best effort, not guaranteed. Azure Synapse Apache Spark pools also abstract cluster provisioning; do not confuse them with dedicated SQL pools. Choose a Fabric custom pool for compute configuration needs, not because starter pools inherently mix different users’ application state.
When prewarmed capacity is available, Fabric avoids provisioning a new cluster. Exhausted starter capacity, custom dependencies, or networking restrictions can increase startup time or require on-demand provisioning. Session timeout controls reuse of an existing session; it does not reserve starter-pool availability. Custom live pools provide scheduled prewarming when predictable starts are important.
Whether you distinguish best-effort prewarming, session reuse, and configurable compute, and account for startup variability when choosing a pool.
Q2
Use starter pools when their Medium nodes and best-effort fast startup fit the workload, including suitable production workloads. Use custom pools for different node sizes and scaling requirements. Fabric Environments manage pinned dependencies independently of that choice. For predictable warm startup, evaluate custom live pools.
| Dimension | Starter Pool | Custom Pool |
|---|---|---|
| Start time | Typically 5–10 seconds without personalization; best effort | Typically 2–5 minutes on demand; live pools can prewarm |
| Node type | Medium | Choose a supported node size within capacity limits |
| Library pinning | Via Fabric Environment; personalization can add startup time | Via Fabric Environment; publishing mode affects startup |
| Resource sharing | Standard sessions are separate Spark applications; capacity is shared | Separate Spark applications by default; capacity is still shared |
| Best for | Exploration, dev/test, light notebooks | Production ETL, ML training, TB-scale processing |
Whether you select compute from measured resource needs, dependency startup, networking requirements, and workload SLAs rather than assuming one pool type is inherently production-only.
Q3
A single-node pool runs the driver and executor on the same VM, sharing that node’s resources. It can reduce distributed overhead for small workloads, but CPU, memory, disk, and parallelism are limited to one machine. Input data does not all have to fit in RAM: Spark can process partitions and spill to disk, although memory-heavy operations can still fail.
Benchmark single-node execution for small ETL, development, or suitable model-training tasks. There is no documented universal 50–80 GB cutoff: compressed input size, working-set expansion, skew, algorithm, and node resources determine whether it is appropriate. Scale out when measured parallelism, memory pressure, or disk limits justify it.
Whether you distinguish dataset size from the peak working set and choose single-node or distributed compute from measured resource use.
Q4
High concurrency lets compatible notebooks share one Spark application within a single-user boundary. Each notebook has isolated REPL execution state, and FAIR scheduling allocates executors across REPLs to reduce starvation. Compute is still shared, so heavy jobs can contend; this is not the same as having no isolation at all.
Sharing is not a cross-user pool for ten analysts. Compatible runs must meet the same-user, lakehouse, configuration, and dependency requirements. High concurrency is supported for pipeline notebook workloads; use separate sessions when contention or workload SLAs justify them. Either notebooks or Spark job definitions can be appropriate for production.
Whether you distinguish isolated notebook state from shared compute and evaluate contention without overstating or ignoring the platform’s isolation and scheduling controls.
Q5
Cold Start: session initializes from scratch, VMs allocated, library Environment loaded. Custom Pools: 2–5 minutes. Warm Start: session reused within the TTL window. Starter Pools: 5–30 seconds because nodes are pre-warmed. TTL is configurable — set it higher for interactive analyst workspaces, lower to release capacity for cost control.
Include provisioning and dependency personalization in scheduled-job SLAs. Autoscale billing changes billing and Spark compute limits; it does not promise warm or deterministic startup. For predictable startup during a defined active window, evaluate custom live pools.
Whether you distinguish session timeout, prewarmed capacity, and active-job billing. A longer timeout can preserve session state and reuse, but idle pool time is not billed as active Spark job execution; a prepaid Fabric capacity has its own running cost.
Q6
Autoscale billing runs Spark jobs on separately metered serverless compute rather than consuming the base Fabric capacity’s Spark compute allocation. Active job execution is billed, not idle pool time. Configure it for a capacity, link the Azure billing resources, and set a maximum CU limit. When that limit is reached, interactive jobs can be throttled and background jobs queued; it is not unlimited compute.
Capacity billing can suit predictable workloads or jobs that fit into already-paid capacity headroom. Autoscale billing separately meters Spark execution and can help with bursty demand. Compare actual CU usage, regional prices, reservations, pause/resume options, and the capacity needed for other workloads. A two-hour nightly job is not enough information to prove which model is cheaper. Enabling autoscale applies to Spark on that capacity; it is not an arbitrary per-job billing switch.
Separately from Autoscale Billing, Fabric now allows Spark jobs to burst up to 3× their base CU allocation by default. Capacity admins can disable this (“Disable Job-level Bursting” in Admin Portal → Capacity Settings → Spark Compute) to prefer concurrency over per-job throughput.
Whether you know this option exists and can articulate when it’s cheaper. Candidates who only know “resize the F-SKU” for cost issues are missing the 2025 billing model that resolves the over-provisioning problem for batch workloads.
Notebooks & Development
The daily developer experience — MSSparkUtils, Environments, VS Code integration, and the Runtime versioning model that changed significantly in 2025–2026.
Q7
Runtime 2.0 is the latest GA and default runtime for new workspaces and Environments: Spark 4.1, Delta Lake 4.2, Python 3.13, Java 21, and Scala 2.13. Runtime 1.3 uses Spark 3.5 and Delta Lake 3.2 with Python 3.11 and is in its announced LTS period through March 2027. Runtime 1.2 is deprecated; do not plan continued execution on a removed runtime.
Fabric runtime numbers map to Spark generations; the numbers are not numerically equal: Runtime 1.x maps to Spark 3.x and Runtime 2.0 maps to Spark 4.1. Prefer the latest GA runtime for new production work after compatibility testing. Runtime 1.3 entered LTS on October 1, 2026, with support extending through March 2027.
| Runtime | Spark | Delta Lake | Python | Status |
|---|---|---|---|---|
| 1.2 | 3.4.x | 2.4 | 3.10 | Deprecated Mar 2026 |
| 1.3 | 3.5 | 3.2 | 3.11 | LTS through March 2027 |
| 2.0 | 4.1 | 4.2 | 3.13 | GA — default for new items |
Moving to Runtime 2.0 changes Python, Java, Scala, Spark, and Delta compatibility. Update the Environment runtime, review migrated dependencies, replace incompatible packages or JARs, and publish and test before production rollout. You do not have to re-enter every library unconditionally: Fabric migrates library definitions, while compatibility and rebuilding depend on the component changes. SparkR is deprecated in Spark 4.x.
Whether you know the latest GA runtime, the Runtime 1.3 LTS window, and the need to test dependency and table-protocol compatibility before upgrading.
Practise this: Check the Runtime 2.0 stack and migration checklist.
Q8
The Native Execution Engine offloads supported Spark operators to vectorized C++ execution through Apache Gluten and Velox. The cited TPC-DS SF1000 benchmark reached up to 6× the open-source Spark performance; the associated roughly 83% runtime-related saving assumes a fixed cluster and that speedup. It is not guaranteed for every job or a prepaid capacity bill. Enable it with spark.native.enabled=true or the Environment acceleration setting, then verify native operators and measure the result.
# Enable for current session spark.conf.set("spark.native.enabled", "true") # Or set at Environment level for all jobs in the workspace # Environment → Spark compute → Acceleration → Enable native execution engine; Save and Publish # Spark Advisor alerts you in the notebook cell output # when an operator falls back to JVM (unsupported operators auto-fallback)
Fabric’s engine and Databricks Photon both accelerate supported operations, but the cited Fabric benchmark is against open-source Spark, not a head-to-head Photon benchmark. Compare the same queries, data, cluster resources, operator coverage, and total cost before claiming one platform is faster. Fabric Runtime 2.0 now provides Spark 4.1, so Spark 4.x availability is not a valid blanket differentiator.
Whether you know this feature exists — and whether you give a nuanced current comparison rather than the outdated “Databricks Photon is always faster” answer. Knowing the ~83% cost savings benchmark signals you’ve read the current documentation.
Q9
MSSparkUtils (also accessible as notebookutils — the canonical alias since Runtime 1.2) is a Fabric-specific utility library that extends PySpark with Fabric-aware operations: file system access, secrets retrieval, notebook chaining, and credentials management.
# File system — mount and browse OneLake notebookutils.fs.ls("Files/") notebookutils.fs.cp("Files/raw/data.csv", "Files/archive/") # Secrets — never hardcode credentials secret = notebookutils.credentials.getSecret("https://my-keyvault.vault.azure.net/", "db-password") # Notebook chaining — run child notebooks with parameters result = notebookutils.notebook.run( "Silver_Transform", timeout_seconds=600, arguments={"env": "prod", "date": "2026-06-01"} )
Whether you know notebookutils is the current alias (not mssparkutils in newer docs), and whether you immediately go to secrets retrieval for credentials — not environment variables or hardcoded strings.
Q10
%pip install in Fabric restarts the Python interpreter mid-notebook — any variables defined before that cell are lost. It also adds installation time to every run and creates version inconsistency across runs if PyPI releases a new version. Fabric Environments solve all three problems.
A Fabric Environment is a publishable item for runtime, compute, and dependency configuration. Pin dependency versions and use Full publishing mode when reproducible pipeline or scheduled runs are required. Quick mode resolves and installs packages at session startup; Full mode builds a snapshot, but deployment can still add startup time. Environments avoid mid-notebook installation and interpreter resets, not all startup overhead. Inline package installation is disabled in pipeline notebook runs by default and is unsupported in high-concurrency mode and notebook reference runs.
If an inline installation restarts Python, Python variables defined earlier are lost, including Python references to DataFrames. Put installations before executable notebook logic, and prefer a published Environment for repeatable runs. Do not rely on a blanket cross-platform comparison: package-install restart behavior varies by product and runtime version.
Whether you understand session-scoped installation, interpreter restarts, and reproducible Environment publishing, including the restrictions on inline installation in orchestrated runs.
Practise this: Work through the notebook transformation tutorial.
Q11
Store secrets in Azure Key Vault and retrieve them with notebookutils.credentials.getSecret(vault_url, secret_name), using the fully qualified vault URL. This utility uses the executing user’s credentials and requires Key Vault secret-read permissions and network access; it does not require a Fabric cloud connection to the vault. Test the actual scheduled or pipeline execution identity. Never put secrets in source code or intentionally print them.
Fabric’s native notebook Git integration excludes cell outputs. Hardcoded secrets in notebook source still enter Git history, and manually exported notebooks or custom CI workflows may include outputs. Key Vault reduces hardcoding risk but is not a complete disclosure barrier: authorized code receives plaintext, and output redaction is best effort. Restrict access, review logs and exports, and rotate exposed credentials.
Security hygiene under pressure. The strongest answer includes the Git history risk — most candidates stop at “don’t hardcode.” The interviewer wants to see you understand persistence vectors, not just the surface rule.
Q12
Fabric Notebook REST APIs let Azure DevOps, GitHub Actions, and other orchestrators start notebook jobs, pass parameters, and retrieve status without the portal. Use the documented API version, supported identity, execution scope, and item permissions; keep tenant settings and target-workspace permissions separate from API scopes.
Start a job, retain its run identifier, and follow the API’s polling and error-handling contract. A pipeline is useful for dependencies, retries, and several activities, but is not required merely to schedule one notebook: Fabric also provides native notebook scheduling. Git integration versions definitions; executing a notebook is a separate deployment-validation or operational step.
Whether you know this capability exists in 2026 — and whether you can articulate why it matters (external orchestration, CI/CD integration, GitOps patterns). Candidates who still describe only DevOps Git sync without mentioning the APIs reveal they haven’t tracked the platform recently.
Optimization & Performance
Where senior engineers are separated from junior ones. V-Order, Z-Order, Liquid Clustering (new in Delta 4.x), shuffle tuning, join strategies, and Delta MERGE optimization.
Q13
V-Order is a write-time sorting and compression optimization that makes Parquet files efficient for the VertiPaq engine used by Power BI Direct Lake. It adds ~15% write overhead but delivers 2–3× read speedup for BI queries. It doesn’t belong on write-heavy staging or Bronze tables where the overhead is pure cost with no read benefit.
| Layer | V-Order | Reason |
|---|---|---|
| Bronze / Staging | Disable | Write-heavy ingestion — 15% overhead wasted before data is transformed |
| Silver / Transform | Optional | Enable only if analysts query Silver directly in Power BI |
| Gold / Serving | Enable | Read-heavy, BI-facing — speedup justifies write overhead on every OPTIMIZE |
Whether you understand V-Order as a write-time cost / read-time benefit tradeoff that should be applied selectively, not globally. The layer-specific recommendation demonstrates real architecture thinking.
Q14
Frequent small writes can create many Parquet files and increase file-opening and metadata overhead. Use OPTIMIZE, explicitly configured auto compaction, and suitably sized write partitions. Do not assume auto compaction is enabled: inspect session and table settings. Liquid clustering manages layout through OPTIMIZE; it is not a replacement for compaction. Runtime 2.0 is now GA with Delta Lake 4.2.
# Option 1: Manual OPTIMIZE (compacts + optionally Z-Orders) spark.sql("OPTIMIZE sales_gold ZORDER BY (customer_id, order_date)") # Option 2: coalesce before writing — prevents small files at source df.coalesce(8).write.format("delta").mode("append").save(table_path) # Option 3: Define clustering, then maintain it with OPTIMIZE. # Use a new table here; choose explicit types for the real source schema. spark.sql(""" CREATE TABLE sales_gold_clustered ( customer_id STRING, order_date DATE, amount DECIMAL(18,2) ) USING DELTA CLUSTER BY (customer_id, order_date) """) spark.sql("OPTIMIZE sales_gold_clustered")
Whether you distinguish write partition sizing, file compaction, and clustering. All require workload-specific choices; liquid-clustered tables still need OPTIMIZE, and incremental clustering in Runtime 2.0 reduces how much data each maintenance run rewrites.
Q15
V-Order improves Parquet encoding and compression for read-heavy consumers. Z-Order colocates column values to improve data skipping. Liquid clustering stores chosen clustering keys in table metadata instead of using static partitions or repeated Z-Order specifications. It applies the layout during OPTIMIZE; Runtime 2.0 adds incremental maintenance of new, changed, or unhealthy files. You still select and maintain appropriate keys.
| Technique | Purpose | Maintenance | Best for |
|---|---|---|---|
| V-Order | VertiPaq read compression | Applied at write time | Gold tables used in Power BI Direct Lake |
| Z-Order | Co-locate related rows for data skipping | Manual OPTIMIZE required | Large fact tables with known filter columns in Spark SQL, Runtime 1.3 |
| Liquid Clustering | Flexible, incremental data layout | Run or orchestrate OPTIMIZE; keys persist in metadata | Tables whose selected clustering keys improve data skipping; incremental maintenance on Runtime 2.0 |
You can combine V-Order with either Z-Order or Liquid Clustering — they operate at different layers. V-Order is a Parquet encoding optimization; Z-Order/Liquid Clustering are data layout strategies.
Whether you know Liquid Clustering is available in Runtime 2.0 and how it replaces the Z-Order + static partition combination for new table design. This is the clearest signal of whether a candidate is following Delta Lake 4.x development.
Q16
Inspect the effective spark.sql.shuffle.partitions and AQE settings rather than assuming a workspace default. The upstream Spark default is 200, but workload configuration can differ. Estimate an initial count from measured shuffle bytes and a trial target such as 128 MB per partition, then check task duration, skew, spill, and available cores. AQE can coalesce eligible small shuffle partitions; it does not guarantee every oversized or skewed partition will be fixed.
spark.conf.set("spark.sql.shuffle.partitions", "800") # start here for 100GB shuffle spark.conf.set("spark.sql.adaptive.enabled", "true") # on by default in Fabric spark.conf.set("spark.sql.adaptive.advisoryPartitionSizeInBytes", "134217728") # 128 MB
For more on shuffle boundaries, AQE skew-join limitations, and Storage Partition Join, see our Spark Shuffle Optimization guide. A narrow coalesce() does not itself create a shuffle, but it does not globally disable AQE for other exchanges in the query.
Whether you know the formula for deriving the partition count from actual data size rather than guessing a magic number. Mentioning AQE as a runtime correction layer alongside static tuning signals mature understanding.
Practise this: Practise shuffle-partition diagnosis and tuning.
Q17
Three tools: (1) AQE’s built-in skew join handling (fires when a partition is >skewedPartitionFactor × median AND >256 MB), (2) Broadcast join for small dimension tables, (3) Manual salting when 1–2 keys dominate and AQE isn’t enough.
AQE can split eligible skewed shuffle partitions and replicate matching data where needed; supported behavior depends on join type. For left outer joins, skew splitting applies to the left side. coalesce() alone creates no new shuffle statistics, but other exchanges can still be optimized by AQE. Use salting only after inspecting the plan and task distribution; there is no universal 5–10× key-frequency threshold, and the salting design must preserve join semantics.
The progression from “enable AQE” to “AQE has limits” to “salting when AQE fails.” Candidates who stop at step one haven’t debugged production skew. Candidates who jump straight to salting haven’t used AQE.
Q18
For current PySpark DataFrames, cache() uses StorageLevel.MEMORY_AND_DISK_DESER, the default DataFrame persistence level; RDD defaults differ. Cached partitions can reside in memory or on disk. Choose persist(StorageLevel.DISK_ONLY) only when measurements show it is preferable; a DataFrame larger than total cache memory can still benefit from partial memory caching.
Critical production rule: always call df.unpersist() when you’re done with a cached DataFrame. Fabric Spark sessions can persist for hours (TTL), and cached DataFrames that are no longer needed compete with shuffle buffers for executor memory — a common cause of OOM errors mid-pipeline that are difficult to trace.
Whether you know unpersist discipline — not just when to cache. Candidates who mention unpersist proactively have seen memory issues caused by forgotten caches in production.
Q19
Broadcast the small table when joining a large fact table with a small dimension (lookup) table. Spark sends the small table to every executor, eliminating a shuffle of the large table entirely. AQE can promote a Sort-Merge Join to Broadcast if the filtered small side is under autoBroadcastJoinThreshold — but that still occurs after the first shuffle already ran.
from pyspark.sql.functions import broadcast # Force broadcast of the dimension table — skips the shuffle entirely df_result = df_large.join( broadcast(df_small), on="customer_id" ) # Explicit hint is better than relying on AQE dynamic promotion: # AQE promotes AFTER the first shuffle already ran. The hint avoids it entirely.
Whether you know the difference between a planned broadcast join and AQE conversion after runtime statistics become available. A suitable hint can avoid shuffle work, but is not always faster: verify build-side size, join support, broadcast time, and executor memory before forcing it.
Q20
Use semantically valid target filters so MERGE can prune files or partitions, compact a fragmented target when the saved scan cost justifies it, and process a deduplicated incremental source batch. Do not filter the source down to existing matches: that would lose rows intended for WHEN NOT MATCHED inserts. The example’s date cutoff is safe only when the intended batch is already limited to that range and late-arriving or historical updates are handled separately.
from delta.tables import DeltaTable # Run OPTIMIZE first if target hasn't been compacted recently spark.sql("OPTIMIZE sales_silver WHERE order_date >= '2026-01-01'") # Pre-filter source to only rows that can possibly match source_filtered = source_df.filter("order_date >= '2026-01-01'") DeltaTable.forName(spark, "sales_silver"). alias("target"). merge(source_filtered.alias("src"), "target.order_id = src.order_id AND target.order_date = src.order_date"). whenMatchedUpdateAll(). whenNotMatchedInsertAll(). execute()
Whether you use the physical plan and table layout to validate partition pruning and file skipping. Referencing a partition column alone does not guarantee efficient pruning, and nonpartitioned tables can still skip files through statistics and clustering. Never change the business match key merely to force a faster plan.
Lakehouse Architecture
Delta Lake table design, the Direct Lake integration between Spark and Power BI, VACUUM, partitioning strategy, and schema evolution.
Q21
A managed table gives the catalog control of metadata and table storage; dropping it can delete its underlying data. An external table registers data at an explicit location, so dropping the catalog entry normally leaves those files. A Delta path written under Files is not automatically a registered external table. Managed Bronze tables are valid when access controls, retention, recovery, and immutable source retention meet the design requirements.
Data lifecycle governance: understand DROP behavior, source-of-truth retention, least-privilege permissions, and recovery. Table-management choice alone does not protect raw data from accidental writes or deletes.
Practise this: Inspect Lakehouse tables and file locations.
Q22
Delta Lake is the native table format for Fabric lakehouse analytics, Warehouse storage, and many mirrored replicas. OneLake also supports Iceberg tables: you can write Iceberg data or shortcut existing Iceberg tables and use metadata virtualization for supported Fabric consumers. Delta tables can expose virtual Iceberg metadata to compatible external readers. Runtime 2.0 now includes Delta Lake 4.2.
Choose the system of record, write engine, and table features based on producer and consumer compatibility. OneLake metadata virtualization can avoid copying Parquet data between formats, but it is not synonymous with enabling Delta UniForm. Validate the documented table-feature, metadata, and reader limitations instead of assuming every Delta/Iceberg feature interoperates.
Whether you understand native Delta integration, bidirectional metadata virtualization, and the limits of compatible readers and writers, rather than treating format choice as a universal rule.
Q23
Spark writes to a Delta table update the Delta transaction log. Direct Lake reads the log to determine which Parquet files to load. Excessive small files from Spark writes slow down “framing” (the process where Direct Lake loads file metadata). V-Order on Gold tables improves Direct Lake read performance after framing.
Direct Lake on OneLake does not fall back to DirectQuery through the SQL analytics endpoint. If applicable guardrails are exceeded, refresh can fail and the model cannot be queried until the tables are brought within the limits. Direct Lake on SQL can fall back when configured to do so. Compaction helps control file and row-group counts; V-Order is a read-performance optimization, not a prerequisite for a valid Direct Lake table. A table without V-Order does not automatically make reports fail.
Whether you know about the two Direct Lake variants and understand the data engineer’s responsibility for Gold table quality now that the no-fallback mode can cause explicit report failures. A strong answer connects Spark write patterns to Power BI runtime behavior.
Q24
VACUUM removes eligible data files no longer referenced by the current Delta table version once the retention threshold has elapsed. DELETE changes the logical table state, but older files can retain deleted values. DELETE followed by retention-aware VACUUM is part of physical data lifecycle management, not a complete GDPR compliance guarantee: account for raw sources, derived copies, exports, backups, and any deletion-vector files that still reference underlying data.
# Step 1: Logical delete spark.sql("DELETE FROM customers WHERE customer_id = '12345'") # Step 2: Remove eligible obsolete files after the approved retention window. # This does not immediately purge files just made obsolete by the DELETE. # Keep retention safety checks enabled; coordinate concurrent readers and writers. spark.sql("VACUUM customers RETAIN 168 HOURS")
VACUUM can make historical versions unreadable when their required data files are removed; it does not delete every historical file or the entire transaction log. Very short retention can also break active readers or writers and cause data loss. Set a reviewed retention policy that meets operational and erasure requirements; do not assume zero-hour retention is safe or legally required.
Whether you distinguish logical deletion from physical lifecycle management and understand retention safety, historical readers, and erasure across all copies. Technical table maintenance does not by itself establish legal compliance.
Q25
Avoid partitioning small tables or creating many tiny partitions. There is no universal hard 10 GB table-size threshold: choose a column only when common filters can prune meaningful amounts of data and each resulting partition remains adequately sized. Low-cardinality dates or regions can work; high-cardinality IDs usually fragment storage. Consider liquid clustering when more flexible keys and file-level skipping suit the workload.
- Good partition columns: Year, YearMonth, Region, Product Category — bounded, relatively low-cardinality values that appear in WHERE clauses
- Bad partition columns: DateTime (creates millions of partitions), UserID, OrderID — unbounded high-cardinality values that fragment the table
- The alternative: Liquid clustering lets you define or change clustering keys without static directory partitions. Select keys from actual filter patterns and run
OPTIMIZEto apply the layout. It does not automatically infer evolving query predicates; Runtime 2.0 supports incremental clustering maintenance.
Whether you evaluate filter selectivity, cardinality, and bytes per partition, and distinguish a useful sizing heuristic from a platform limit.
Q26
.option("mergeSchema", "true") supports additive columns; it does not grant arbitrary type changes. For supported widening such as INT to BIGINT, first enable the table’s type-widening feature and verify all readers and writers support the resulting protocol. Runtime 1.3 uses the preview table feature; newer runtimes use the corresponding supported feature. Incompatible conversions require an explicit cast/rewrite strategy.
# ✓ Safe: add a new nullable column df_new.write.format("delta").option("mergeSchema", "true"). mode("append").save(table_path) # Enable compatible type widening only after validating all table clients. spark.sql("ALTER TABLE orders SET TBLPROPERTIES ('delta.enableTypeWidening' = 'true')") spark.sql("ALTER TABLE orders ALTER COLUMN amount TYPE BIGINT") # Renames can use ALTER TABLE RENAME COLUMN with column mapping enabled. # Coordinate consumers; overwriteSchema is not a required rename mechanism. # ✗ Unsafe: change string → int (Delta rejects — incompatible widening)
Whether you know the difference between additive schema changes (mergeSchema) and type narrowing (which Delta rejects). Candidates who say “just use mergeSchema for everything” haven’t hit a type incompatibility in production.
Troubleshooting
Where senior engineers are separated from everyone else. Use the STAR method for failure scenarios. The 2025-introduced JobInsight library changes how you diagnose Spark jobs programmatically.
Q27
Py4JJavaError is a Python wrapper around a JVM exception. Inspect its nested exception and Spark logs for the actual cause: storage or authorization failures, schema or SQL errors, conflicting Delta transactions, dependency incompatibility, and resource exhaustion are examples. Delta uses optimistic concurrency control, not a generic file lock for normal concurrent reads and writes.
Read the complete exception chain, including Caused by:, and correlate it with driver and executor logs. For a Py4JJavaError, the wrapped Java exception is available through e.java_exception. A ProtocolChangedException indicates a conflicting table-protocol change; ordinary snapshot reads concurrent with a write are supported. Diagnose the reported error rather than assuming a ‘most common’ cause.
For ‘Path not found’ or ‘Not a Delta table’, check the path, permissions, and Delta log. AnalysisException can cover unresolved names, invalid SQL, schema problems, and other analysis failures. ConcurrentWriteException is an optimistic transaction conflict, not proof of a file lock; retry only after assessing whether the operation is safe and idempotent.
Whether you know to read the Java stack trace inside the Py4J wrapper rather than treating it as a single generic error. Candidates who say “Py4JJavaError means something went wrong in the JVM” without drilling into the root cause reveal they’ve only seen this error, not debugged it.
Q28
OOM errors are different depending on where they occur. Driver OOM: caused by pulling data to the driver (collect(), toPandas(), large broadcast tables). Fix: write to disk, don’t collect. Executor OOM: caused by large shuffle partitions, skewed joins, or forgotten cached DataFrames competing with shuffle buffers. Fix: raise shuffle partitions, fix skew, unpersist unused DataFrames.
| OOM Type | Symptom | Root Cause | Fix |
|---|---|---|---|
| Driver OOM | Error in driver log, job dies immediately | collect(), toPandas(), oversized broadcast | Write to Delta instead of collecting; sample before toPandas; check broadcast table size |
| Executor OOM | Error in executor log, tasks fail and retry | Shuffle partitions too large, skewed keys, unnecessary cached DataFrames filling memory | Raise shuffle.partitions, fix skew, df.unpersist() |
| Executor overhead OOM | “Container killed” message | High JVM object churn (UDFs, large JSON parsing) | Increase spark.executor.memoryOverhead; switch from Python UDFs to Spark SQL functions |
Fabric’s Spark troubleshooting documentation explicitly includes YARN container memory-limit messages and exit code 137. Distinguish driver heap, executor heap, Python/native overhead, and disk-pressure failures rather than dismissing those messages. Set launch-time resource properties such as spark.executor.memoryOverhead in the Environment or an initial %%configure cell, not a mid-session spark.conf.set(). Increase overhead only when logs support that diagnosis.
Whether you separate driver, executor, and overhead failures, inspect the real Fabric logs, and choose a launch-time resource or code change appropriate to the evidence.
Q29
Check whether the path exists, whether the shortcut’s source still exists, whether the path and default lakehouse are correct, and whether access is authorized. Shortcut authentication depends on shortcut type and its configured connection; it is not always delegated as the notebook user. An unregistered table name normally causes a catalog resolution error, which is distinct from a missing physical path.
Diagnosis order: run notebookutils.fs.ls("path") to verify the path exists before any Spark operation. If ls fails, it’s a path or permission issue. If ls succeeds but Spark fails, it’s a catalog or Delta metadata issue — try spark.read.format("delta").load("path") with an explicit path instead of table name to isolate.
Whether you know notebookutils.fs.ls() as the first diagnostic step rather than immediately modifying Spark code. Using the right tool at the right layer separates experienced engineers from those who debug blindly.
Q30
Spill occurs when an operation’s working set exceeds its available execution memory and Spark writes intermediate data to disk. Sorting, aggregation, and shuffle can spill. It is an expected mechanism for processing data larger than memory, not automatically a configuration failure; excessive spill, skew, or exhausted local disk can still dominate runtime or fail the job. The slowdown depends on the workload and storage, not a fixed 10–100× multiplier.
Spill appears in the Spark UI as “Spill (Memory)” and “Spill (Disk)” columns in the Stages tab. Any value above 0 warrants investigation. The fix: raise spark.sql.shuffle.partitions so each partition is smaller and fits in executor RAM, or switch to a Memory Optimized node type if the workload is inherently memory-intensive.
Whether you know where to inspect spill and task imbalance and can decide from elapsed time, memory, skew, and disk use whether tuning is worthwhile.
Q31
The Job Insight library is in Preview and analyzes completed Spark applications from a Scala notebook on Runtime 1.3 or later. It returns Spark Datasets for queries, jobs, stages, tasks, and executors. Direct PySpark access is not supported. The analysis notebook and target job must be on the same Fabric capacity.
%%spark
import com.microsoft.jobinsight.diagnostic.{SparkDiagnostic, LogUtils}
// Define workspaceId, artifactId, livyId, jobType, attemptId,
// stateStorePath, and targetDirectory from the completed job.
// Use a new stateStorePath and writable ABFSS locations.
val insight = SparkDiagnostic.analyze(
workspaceId, artifactId, livyId, jobType, stateStorePath, attemptId
)
insight.stages.printSchema()
insight.stages.show()
insight.tasks.show()
val copiedBytes = LogUtils.copyEventLog(
workspaceId, artifactId, livyId, jobType,
targetDirectory, false, attemptId
)Whether you can combine Spark UI diagnosis with documented programmatic telemetry, while acknowledging the library’s Preview status, Scala-only access, and same-capacity boundary.
Q32
Use the Fabric Capacity Metrics app to inspect CU usage by item, workspace, operation, and time. Its compute/timepoint views provide 30-second timepoints, not 30-minute granularity. Filter to the relevant notebook, Spark job definition, or Lakehouse operation and correlate run IDs and Spark monitoring details; ‘Spark Engine’ is not a universal item-type filter.
Correlate spikes with operation duration, CU seconds, failures, retries, and concurrent workloads. Capacity views include smoothing, so prolonged reported utilization does not prove a job is still running or retrying. Use the evidence to decide between code tuning, scheduling, capacity sizing, and autoscale billing; separately metered Spark usage is visible in the relevant monitoring views.
Whether you can connect Spark behavior to capacity cost — not just “fix the Spark code” but understand when the right fix is “schedule differently” or “switch to Autoscale Billing.”
Scenarios & Architecture Decisions – Fabric Data Engineering Interview Questions
Production pattern design — streaming checkpoints, CI/CD, agentic automation, GDPR, unit testing, and the recurring Spark-vs-SQL-vs-Dataflow decision.
Q33
Use a durable, unique checkpoint path outside managed table data, such as a Lakehouse Files/checkpoints/... directory. Keep it across restarts so offsets and state can be recovered. Deleting it creates a new query; the restart position depends on source options and retained source history, so it may replay data, skip data, or fail rather than always restart at the beginning. Do not share one checkpoint between independent streams.
query = (df_stream .writeStream .format("delta") .outputMode("append") .option("checkpointLocation", "Files/checkpoints/events_stream") .trigger(processingTime="5 minutes") .toTable("events_silver") )
2026 alternative for CDC streams: The Mirrored Database Change Feed connector (June 2026) provides a fully managed path from CDC sources to Real-Time Intelligence destinations — no custom Spark streaming notebook required. Evaluate this for new CDC pipelines before writing Structured Streaming code.
Whether you know the checkpoint must be in an unmanaged, persistent location — not a managed Delta table path. Mentioning the 2026 Change Feed connector alternative signals awareness of when to not write Spark code.
Q34
Distinguish three capabilities: Fabric data agents help answer questions over configured data; the data engineering agent (Project Osmos, Preview) plans, creates, executes, and validates Spark/Delta engineering tasks; MCP servers expose documented Fabric operations to compatible clients. Project Osmos is not Google Dataform, and these tools do not remove permission checks, preview limitations, or human responsibility for data quality and safe writes.
A concrete agentic task is to inspect source files, generate a transformation notebook, write Delta tables, and validate row counts and schemas against an approved outcome. Review the agent’s permissions and write-safety settings first. A Mirrored Database Change Feed connector is a separate ingestion/orchestration capability, not evidence that an agent is operating autonomously.
Whether you describe a concrete task, the executing identity, reviewed write scope, validation, and failure handling instead of treating every AI feature or managed connector as autonomous data engineering.
Q35
Use Git integration for notebook definitions, deployment pipelines or item APIs for promotion, and job-execution APIs for smoke tests and operational runs. These are separate concerns. Parameterize environment-specific paths and verify the target Environment, default lakehouse, connections, permissions, and runtime after promotion.
Keep secrets out of notebook source. Native Fabric Git sync excludes cell outputs, but review manually exported notebooks and custom CI artifacts for sensitive output. Use a least-privilege automation identity and validate the notebook’s execution context: scheduled runs use the schedule creator/updater, while pipeline notebook execution follows the documented pipeline identity behavior. Local MCP tooling can assist development but is not a prerequisite for CI/CD.
Whether you distinguish source control, promotion, and execution validation and can deploy the same code safely with environment-specific bindings and an authorized run identity.
Practise this: Build a repeatable Fabric deployment workflow.
Q36
DELETE changes the current Delta table state; rows are stored in data files, not as rows in the transaction log. Obsolete files can retain deleted values until they become eligible for VACUUM under the retention policy. Account for deletion vectors or other features that can leave referenced data files, and verify physical cleanup across all relevant copies. DELETE plus VACUUM for one table is not a complete erasure or GDPR guarantee.
Inventory personal data in Bronze, Silver, Gold, exports, caches, and source systems, and coordinate approved deletion and retention policies with the responsible privacy team. There is no universal Gold → Silver → Bronze execution order. Prevent upstream reingestion or downstream rebuilds from restoring deleted data, reconcile dependencies, and validate completion. Aggregated data may require different treatment depending on whether it remains identifiable.
Whether you understand the Bronze-Silver-Gold cascade requirement. Candidates who only discuss the DELETE + VACUUM pattern for a single table haven’t thought through the cross-layer data lineage implications.
Q37
Extract transformation logic into Python modules (not notebook cells). Test those modules locally in VS Code using pytest with a local SparkSession. Deploy tested modules to a Fabric Environment. The notebook becomes an orchestrator that calls tested functions — not the location of business logic.
In-notebook testing with pytest works but requires the full Spark session to be running, which means tests are slow and depend on Fabric infrastructure. Local testing with small synthetic DataFrames (a few hundred rows) is faster, more isolated, and compatible with CI/CD pipelines that don’t have Fabric access.
Whether you know the fundamental principle: logic should live in modules, notebooks should be thin orchestrators. Candidates who describe only in-notebook testing reveal they haven’t separated concerns in their codebases.
Q38
Spark for heavy ETL, complex transformations, Python-native ML, and unstructured data. T-SQL Warehouse for BI serving, enforcing row-level security, and schema-on-write governance. Dataflow Gen2 for simple transformations by non-engineers without Spark or SQL skills.
| Tool | Use when | Avoid when |
|---|---|---|
| Spark (Notebook / SJD) | TB-scale ETL, Python ML libraries, complex joins, streaming, unstructured data | Simple SQL aggregations, BI serving with RLS requirements, no-code scenarios |
| T-SQL Warehouse | Serving Gold layer to Power BI, enforcing column/row security, strict schema governance | Transforming raw Bronze data, ML workloads, streaming ingestion |
| Dataflow Gen2 | Low-code Power Query transformation; larger ingestion using folding, staging, and eligible Fast Copy; MDF transforms in Preview | Arbitrary Python-native dependencies or continuous event-stream processing; benchmark large transformations |
Whether you know Dataflow Gen2 as a third option and can explain why an architect would choose it (citizen developer accessibility) rather than treating everything as a Spark-vs-SQL binary.
Q39
Bronze commonly preserves raw arrivals with append-oriented, idempotent ingestion and controlled replay. Silver often uses MERGE for deduplicated incremental updates; deduplicate the source first, and implement SCD Type 2 history explicitly rather than assuming update-all preserves history. Gold can use a full rebuild or incremental MERGE according to cost and freshness requirements. These are design patterns, not mandatory write modes for every table.
# Bronze — append retained raw input; make ingestion idempotent and allow controlled replay df_raw.write.format("delta").mode("append").save("Files/bronze/events") # Silver — MERGE for deduplication + schema enforcement DeltaTable.forName(spark, "events_silver").alias("t").merge( df_cleaned.alias("src"), "t.event_id = src.event_id" ).whenMatchedUpdateAll().whenNotMatchedInsertAll().execute() # Gold — overwrite for aggregated business metrics (full rebuild) df_metrics.write.format("delta").mode("overwrite").saveAsTable("sales_metrics_gold")
Whether you know each layer uses a different write semantic for a principled reason, not just different syntax. The Bronze append-only rule and the Gold overwrite-vs-MERGE decision are the two most commonly misunderstood in production deployments.
Q40
Start with actual job CU usage, Azure charges, duration, retries, and capacity contention. Then test native execution where supported, tune skew/shuffle/cache behavior, compact fragmented tables, apply V-Order selectively to read-heavy data, and compare capacity billing with autoscale billing. Throttling is a service-protection outcome, not a special per-throttle surcharge; changing a schedule can reduce contention without necessarily reducing total smoothed CU consumption or the purchased capacity bill.
Priority order: Identify the dominant measured cost first. Verify engine configuration and native operators in the physical plan, then benchmark representative jobs. Fallback alerts identify unsupported operators, but their absence does not prove the engine is enabled. Native execution can help CPU-heavy supported queries, not every I/O, skew, or orchestration bottleneck.
Model billing at the capacity level using actual job compute, regional rates, reservations, and any already-paid headroom. Autoscale can avoid resizing a capacity for short bursts, but enabling it separately meters Spark for that capacity. Compare it with the incremental cost of existing capacity and pause/resume options; two hours per night does not establish a universal break-even point.
Whether you make an evidence-based optimization and billing comparison, validate the result, and distinguish faster execution from a reduction in the actual purchased-capacity bill.
Practise this: Review the capacity optimization workflow.
Architecture done. Data Engineering done. T-SQL, Warehouse design, and query optimization are next.
Start Warehouse Questions →Choose your next practice session
Return to the Fabric interview hub for role-based preparation and the full question-bank index.
Microsoft documentation used in this review
Open the official reference list
- runtime
- runtime 2 0
- lifecycle
- spark compute
- high concurrency overview
- library management
- native execution engine overview
- notebookutils credentials
- notebook source control deployment
- autoscale billing for spark overview
- billing capacity management for spark
- troubleshoot spark memory performance
- configure high concurrency session notebooks in pipelines
- configure autoscale billing
- run on demand notebook
- how to use notebook
- table compaction
- liquid clustering
- delta optimization and v order
- dataframe cache
- delta lake table maintenance
- lakehouse and delta tables
- onelake iceberg tables
- lakehouse table maintenance
- delta lake schema evolution
- troubleshoot spark sql schema errors
- onelake shortcuts
- configure resource profile configurations
- direct lake overview
- job insight library
- metrics app compute page
- metrics app timepoint page
- structured streaming overview
- data engineering agent overview
- dataflows gen2 fast copy
- dataflow gen2 mapping data flows transforms
