In this post we are going to cover Spark, notebooks and environments in Microsoft Fabric: starter pools, environments, high concurrency, Runtime 2.0, the Native Execution Engine and notebook orchestration. These are 7 real Microsoft Fabric interview questions, asked the way they come up on a real project, and the last one is a scenario where a nightly Spark job went from twenty minutes to two hours.
Spark is the engine behind lakehouse notebooks and Spark job definitions in Fabric. You don't manage clusters yourself, but you still decide which pool a notebook runs on, which libraries it gets and which runtime it uses. Interviewers ask about it because these are the questions that show you have run Spark in Fabric for real: slow starts, shared libraries, runtime upgrades and orchestration.
Part 4 of the Real Time Microsoft Fabric Interview Questions and Answers series on TechBrothersIT.
- The short answer
- Question 1: Your notebook takes minutes to start some days and seconds on others. How do starter pools, custom pools and environments affect start-up?
- Question 2: The team needs the same libraries and Spark settings in every notebook. What is an environment, and how do you manage it?
- Question 3: Five developers run notebooks at once and burn the capacity. What is high concurrency mode, and how does it help?
- Question 4: A data engineer asks what Fabric Runtime 2.0 changes and what happens to 1.3. What do you tell her?
- Question 5: A transformation is CPU-bound and slow. What is the Native Execution Engine, and when does it help or not?
- Question 6: You need to run twenty notebooks in a set order with parameters. How do you orchestrate notebooks, with notebookutils or a pipeline?
- Scenario 7: A nightly Spark job went from twenty minutes to two hours. How do you troubleshoot it, step by step?
The short answer
Fabric Spark starts fast on starter pools; custom pools, libraries and private networking add minutes. An environment pins the runtime, Spark settings and libraries, high concurrency shares one session across notebooks, and Runtime 2.0 with the Native Execution Engine is where new work belongs. Orchestrate with runMultiple or a pipeline.
Keep that in mind. Every question below is one piece of it.
Question 1: Your notebook takes minutes to start some days and seconds on others. How do starter pools, custom pools and environments affect start-up?
Start-up time depends on whether the session lands on a starter pool or needs an on-demand cluster, and on how many libraries it has to install.
Let's go through it in order. Starter pools are prewarmed clusters of Medium nodes. With no custom libraries, a session usually starts in five to ten seconds. But it is best effort: when the starter pool in your region runs out, you wait two to five minutes for an on-demand cluster. A custom pool, or any node size other than Medium, also starts on demand. And Private Link or a managed virtual network removes starter pools completely.
| Typical start | Why | |
|---|---|---|
| STARTER POOL | 5 to 10 seconds | prewarmed Medium nodes, no libraries |
| POOL RAN OUT | 2 to 5 minutes | best effort: on-demand cluster |
| CUSTOM POOL | minutes | non-Medium nodes or custom compute |
| PRIVATE LINK, VNET | minutes | no starter pools at all |
Then environments add their own time, depending on the publish mode:
| Environment libraries | Adds at start |
|---|---|
| Quick mode | 30 seconds to 5 minutes |
| Full mode | about 1 to 3 minutes |
So when a notebook is slow to start, I check three things: did the starter pool run out, did someone add libraries, or did someone change the pool? Session start insights shows where the time went.
To fix it:
- Drop
%pipinstalls you don't need. - Share sessions with high concurrency.
- Use custom live pools, which keep clusters warm on a schedule.
Question 2: The team needs the same libraries and Spark settings in every notebook. What is an environment, and how do you manage it?
An environment is a Fabric item that bundles the runtime version, compute settings, Spark properties and libraries in one place.
Libraries can come from:
- Public PyPI or Conda
- Private feeds
- Your own wheel and jar files
You attach the environment to notebooks or Spark job definitions, or set it as the workspace default, so every notebook gets the same setup. One detail people miss: changes only apply after you publish the environment.
There are two publish modes:
| Publish mode | What happens | Added at session start |
|---|---|---|
| QUICK | libraries installed when each session starts | 30 seconds to 5 minutes |
| FULL | snapshot built when you publish | about 1 to 3 minutes |
With full mode, the snapshot built at publish time is what gets deployed when each session starts.
%pip install inside production notebooks. Inline installs only live for that session and bypass the environment. And with outbound access protection or a managed virtual network, PyPI is blocked, so you upload packages as custom libraries instead.
In a real project, I keep one shared environment per workload, set it as the workspace default, and test every change in dev before I publish it in production.
Question 3: Five developers run notebooks at once and burn the capacity. What is high concurrency mode, and how does it help?
High concurrency mode lets several notebooks share one Spark application. Each notebook gets its own REPL, so variables stay separate, and the executors are shared with fair scheduling.
Only the notebook that started the session is billed, and on custom pools, joining a shared session is up to 36 times faster. The default is five notebooks per session, and you can raise it to fifty in the environment.
Now the catch. Sharing a session needs all of these to match:
- Same user
- Same default lakehouse
- Same compute settings
- Same libraries
So five different developers still get five sessions. High concurrency helps one developer with many notebooks, or a pipeline that groups notebooks with a session tag.
For five developers, the fixes are elsewhere:
- Idle timeout: idle sessions stay up for 20 minutes by default, so shorten it.
- Pool size: set sensible max nodes.
- Autoscale Billing for Spark: if Spark keeps hurting the shared capacity, this moves Spark to serverless billing, separate from the capacity.
Question 4: A data engineer asks what Fabric Runtime 2.0 changes and what happens to 1.3. What do you tell her?
Runtime 2.0 has been generally available since August 2026, and Runtime 1.3 is on its way out. So the move isn't optional. Plan it now.
Here is what changes:
| Runtime 1.3 | Runtime 2.0 | |
|---|---|---|
| SPARK | 3.5 | 4.1 |
| JAVA, SCALA | 11, 2.12 | 21, 2.13 |
| PYTHON | 3.11 | 3.13 |
| STATUS | support ended Sep 30, 2026; LTS to Mar 2027 | GA since August 2026 |
Runtime 1.3 reached end of support on September 30, 2026, and is now in long-term support until March 2027.
What breaks? Let's go through the list:
- JARs: they often break, because the Scala and Java versions changed.
- SparkR: deprecated in Spark 4.
- ANSI mode: Spark 4 turns it on by default, so test your casts. A bad cast can fail instead of returning null.
- New tables: written with a newer Delta protocol, with deletion vectors on by default. That matters for readers outside Spark, and protocol upgrades can't be reversed.
My plan has four steps. First, create an environment on Runtime 2.0. Then run the real jobs there and compare row counts and outputs with 1.3. Then fix the JARs and casts. Only then switch the workspace default.
Question 5: A transformation is CPU-bound and slow. What is the Native Execution Engine, and when does it help or not?
The Native Execution Engine runs Spark queries in a vectorized C++ engine, built on Apache Gluten and Velox, instead of the JVM. Microsoft announced it generally available, and it comes at no extra cost.
It fits exactly this case:
- CPU-heavy scans, filters, joins and aggregations
- Parquet, Delta and CSV
- Microsoft cites up to 6 times faster than open-source Spark on a TPC-DS benchmark, and your code doesn't change
Turn it on in the environment, on the Acceleration tab, or per session with %%configure:
%%configure
{
"conf": {
"spark.native.enabled": "true"
}
}Then check that it really ran natively. Look at the query plan for operators ending in Transformer:
df = spark.table("silver_sales")
g = df.groupBy("region").sum("amount")
g.explain() # look for *TransformerSpark Advisor also warns about fallbacks in the cell output.
Where it doesn't help:
- Structured Streaming is not accelerated.
- JSON and XML mostly aren't.
- Unsupported operators fall back to the JVM automatically.
A job full of fallbacks gains little, so test it on your real job first.
Question 6: You need to run twenty notebooks in a set order with parameters. How do you orchestrate notebooks, with notebookutils or a pipeline?
Inside Spark, notebookutils gives you two tools. notebook.run calls one child notebook with arguments and returns the child's exit value. The child runs on the caller's pool.
For twenty notebooks, use runMultiple with a DAG. Each activity has a name, a path, arguments and dependencies. Fabric runs them in parallel threads in one session, in dependency order. Validate the DAG first, and you get back each notebook's exit value.
DAG = {
"activities": [
{"name": "silver_customers",
"path": "nb_silver_customers",
"args": {"run_date": "2026-10-21"}},
{"name": "silver_sales",
"path": "nb_silver_sales",
"args": {"run_date": "2026-10-21"},
"dependencies": ["silver_customers"]},
],
"concurrency": 5,
}
notebookutils.notebook.validateDAG(DAG)
result = notebookutils.notebook.runMultiple(DAG)Parameters work through a parameters cell. Mark a cell as the parameters cell in the child notebook, and the arguments, or a pipeline's base parameters, override those values at run time.
# parameters cell
run_date = "2026-10-21"
# ... the load ...
notebookutils.notebook.exit("ok")So when do I use a pipeline? When I need schedules, retries, failure alerts, or other steps like a copy or a semantic model refresh.
| runMultiple | Pipeline | |
|---|---|---|
| RUNS | one session | scheduled, retried |
| BEST FOR | a DAG of notebooks | mixed steps, alerts |
A common pattern is both: the pipeline calls one orchestrator notebook that uses runMultiple.
%%configure inside a notebook called with notebook.run is ignored. And don't put the exit() call inside a try block.
Scenario 7: A nightly Spark job went from twenty minutes to two hours. How do you troubleshoot it, step by step?
Last month the job took 20 minutes. Last night it took 2 hours. Let's troubleshoot it in order.
- Waiting or running? In the Monitor hub, compare when the job was submitted and when it ran. If it waited, the capacity was full or throttled, and the Capacity Metrics app and the job queue view show why.
- Compare with a good run. Run series analysis compares runs of the same job over time, so you see which stage got slower and whether the input data grew.
- Look inside the job. Open the Spark application detail or the Spark History Server. A few very long tasks in one stage means skew. Thousands of tiny tasks usually means small files. Spark Advisor flags many of these.
- What changed? A new runtime, new libraries, a smaller pool, V-Order turned on for a big write, or the native engine falling back.
- Fix and alert. Fix the cause, then add an alert on duration.
Here is how the symptoms map to causes and fixes:
| Likely cause | Fix | |
|---|---|---|
| LONG WAIT TO START | capacity queue or throttling | move the schedule, separate billing |
| FEW VERY LONG TASKS | skewed key | fix the skewed key |
| THOUSANDS OF TINY TASKS | small files | OPTIMIZE, auto compaction |
And if the pool got smaller, right-size it.
Alert on duration, so you hear about a slow job from the alert, not from the business.
Key points to remember
- Starter pools start in seconds; custom pools, libraries, Private Link add minutes
- An environment pins runtime, Spark settings and libraries; publish to apply
- High concurrency shares a session: same user, lakehouse, settings
- Runtime 2.0 is GA; 1.3 support ended, test JARs, ANSI and Delta
- runMultiple for notebook DAGs; pipelines for schedules and alerts
Part 5: The Fabric Data Warehouse
Part of the Real Time Microsoft Fabric Interview Questions and Answers series on TechBrothersIT. Features, limits and their status (GA or preview) are current as of October 2026; check the Microsoft Learn page for anything you quote in an interview.



No comments:
Post a Comment
Note: Only a member of this blog may post a comment.