Orchestration means deciding what runs, in which order, under which conditions, and what happens when a step fails. Fabric gives you several places to do it. The common confusion is between a pipeline and a notebook, because both can start other work. They are built for different jobs.
What each one is good at
A pipeline is a low-code canvas of activities connected by success, failure, completion and skipped paths. It is a coordinator. It does little transformation itself, but it can copy data, call notebooks, dataflows, stored procedures and other pipelines, and wrap them in control flow:
- ForEach, Until and Switch for looping and branching, If condition for a true or false branch.
- Lookup and Get metadata to read a value or file information that later activities use.
- Wait, Web and Webhook for delays and calls to REST endpoints (a webhook activity waits for a callback).
- Fail to stop with a custom error message and code.
A notebook is code-first compute. It is the right home for complex transformation with Spark and for logic that is awkward to draw. It can orchestrate too, through NotebookUtils:
notebookutils.notebook.run(path, timeout, arguments, workspace)runs another notebook and returns its exit value as a string.notebookutils.notebook.runMultiple(...)runs several notebooks in parallel, or as a DAG with dependencies, and returns an exit value or exception for each activity.notebookutils.notebook.exit(value)ends a notebook with a value for the caller.
An Apache Airflow job is the third option: code-first, Python-based orchestration (DAGs) for teams that already use Airflow.
Choosing
- Several kinds of step (copy, transform, notify) with branching, retries and a schedule: a pipeline.
- Heavy transformation, or many notebooks that share one Spark session and need fine control in code: a notebook, possibly with
runMultiple. - Existing Airflow expertise and Python-defined DAGs: an Apache Airflow job.
- Business analysts need to read and maintain the flow: a pipeline.
The usual answer is both: a pipeline is the outer shell, with notebook activities doing the transformation inside.
How they combine
A Notebook activity in a pipeline runs a notebook and lets you pass base parameters. Mark a cell in the notebook as the parameter cell, set default values in it, and the pipeline values override those defaults at run time. The activity can auto-detect parameters from that cell. Parameter names must start with a letter or underscore and use only letters, digits and underscores.
For the connection, the activity can run under your identity or a workspace identity. For a workspace identity, it must be created in the pipeline's workspace and given at least Contributor access where the notebook lives, and the tenant setting that allows service principals to call Fabric public APIs must be on.
Key differences when notebooks call notebooks with run:
- The child runs on the caller's Spark pool, so there is no new startup, but there is also no separate resource.
- The child can use a different lakehouse only if the parent allows it; by default a conflicting default lakehouse blocks the run.
- Do not wrap
exitin try-catch, or it will not take effect. - Exit values are strings. Convert to a number yourself.
runMultiple uses threads inside one Spark session, so the notebooks share compute. That saves cost but means heavy notebooks compete.
Common mistakes
- Using a notebook for a simple copy that a Copy activity does without any code.
- Building a ten-step conditional flow inside one notebook when a pipeline would show it visually and retry it per step.
- Forgetting the parameter cell, so the passed values are ignored.
- Comparing a notebook exit value with a number without converting it first; the value always arrives as a string.
For the exam
- Pipeline = low-code coordinator with control flow; notebook = code-first transformation and optional orchestration; Airflow job = Python DAGs.
- Pipelines run notebooks through the Notebook activity with base parameters and a parameter cell.
notebookutils.notebook.runreturns the child's exit value as a string;runMultipleruns a list or DAG in parallel in one session.- Combine them: pipeline outside, notebooks inside.