Black Friday50% off your first month on any monthly plan with EARLY50 See plans
All 33 lessons
  1. Start here: cloud and data basics

    1. 1. Start here: the exam, the plan and what you already know
    2. 2. Cloud in plain words: SaaS, PaaS, IaaS and where Fabric fits
    3. 3. Data basics: files, tables, formats and the lakehouse idea
    4. 4. A tour of Microsoft Fabric: OneLake, workspaces and items
    5. 5. The three languages: SQL, PySpark and KQL side by side
    6. 6. Getting data in: the map of Fabric tools
  2. Store, ingest and transform batch data (exam area 2, 30-35%)

    1. 7. Choosing a data store and a transformation tool
    2. 8. Shortcuts and mirroring: use data without copying it
    3. 9. Ingest data with pipelines and Copy job
    4. 10. Transform with PySpark and SQL: join, denormalize, aggregate
    5. 11. Messy data: duplicates, missing values and late arrivals
    6. 12. Full and incremental loads, and loading a star schema
  3. Orchestrate and stream (exam areas 1 and 2)

    1. 13. Pipeline or notebook? Choosing how to orchestrate
    2. 14. Schedules and event-based triggers
    3. 15. Parameters and dynamic expressions
    4. 16. Streaming in Fabric: Eventstreams, Spark streaming and KQL
    5. 17. KQL and windowing functions for real-time data
  4. Set up and secure a Fabric solution (exam area 1, 30-35%)

    1. 18. Workspace settings: Spark, domains, OneLake and data workflows
    2. 19. Version control with Git and database projects
    3. 20. Deployment pipelines: development, test and production
    4. 21. Who can see what: workspace roles and item permissions
    5. 22. Fine-grained security: rows, columns, objects, files and masking
    6. 23. Governance: sensitivity labels and endorsement
  5. Monitor, fix and optimize (exam area 3, 30-35%)

    1. 24. Monitoring hub, alerts and Activator
    2. 25. Fixing errors in pipelines, dataflows and notebooks
    3. 26. Fixing errors in Eventhouse, Eventstream and T-SQL
    4. 27. Optimize lakehouse tables: V-Order, OPTIMIZE, VACUUM and partitions
    5. 28. Optimize Spark, pipelines and warehouses
    6. 29. Optimize eventstreams, eventhouses and queries
  6. Exam practice and final review

    1. 30. Exam day: question types, timing and how to think
    2. 31. Mock exam 1
    3. 32. Mock exam 2
    4. 33. Final review: every decision on one page
See the leaderboard

20 min

Parameters and dynamic expressions

Make one pipeline or notebook handle many tables with parameters and expressions.

By the end of this lesson you can

  • Tell pipeline parameters from variables and use each one
  • Read the dynamic expressions the exam shows and say what they return
  • Pass values from a pipeline into a notebook's parameter cell
  • Build a metadata-driven loop with Lookup and ForEach

From earlier lessons · 1 of 2

A notebook must start the moment a pipeline succeeds, and the two items must stay separate. What starts the notebook?

Pick one answer.

From earlier lessons · 2 of 2

A pipeline schedule is set up with a start date but you can't find an option to leave the end date empty. What should you do to keep it running for years?

Pick one answer.

Northwind Rides copies 30 tables from its SQL Server database every night. A teammate built 30 pipelines, one per table, nearly identical. Then the Lakehouse was renamed, and someone had to open and fix all 30 by hand. Your manager asks for one pipeline that loads every table, and picks up new tables without anyone touching it.

[4]

Parameters and variables

Exam depth: know it cold.

A parameter is a named input to a pipeline. You set its value when a run starts, and it stays the same for the whole run. To add one, select the empty canvas, open the Parameters tab and select + New. Give it a name, a type and a default value.

A variable is a named value the pipeline can change during a run. You create it on the Variables tab and change it with the Set Variable activity. Its type is String, Bool or Array.

ParameterVariable
Set byThe caller: a schedule, a trigger, a person or another pipeline.The pipeline itself, with Set Variable.
Changes during a run?No.Yes.
Read it with@pipeline().parameters.name.@variables('name').

Decision rule: a value that comes in from outside is a parameter; a value the pipeline works out as it runs is a variable.

Fabric also gives you system variables for free, such as @pipeline().RunId and @pipeline().TriggerTime.

[125][126][127]

text
@pipeline().parameters.table_name // value passed in at run start, else the default
@variables('rows_loaded') // current value of a pipeline variable
@pipeline().RunId // system variable: ID of this run
@pipeline().TriggerTime // when the trigger fired, in UTC (ISO 8601)
@pipeline()?.TriggerEvent?.FileName // file that fired an event trigger; null in a manual run
The four kinds of reference you'll read most. The text after // is a note, not part of the expression.

[114][126]

A Northwind Rides pipeline has a parameter table_name with the default stations. Its schedule passes table_name = trips at each run. During a scheduled run, what does @pipeline().parameters.table_name return?

Pick one answer.

[114][125]

The expression language

Exam depth: know it cold.

Dynamic content is a setting whose value is worked out at run time. Next to most settings you'll see Add dynamic content, which opens the expression builder.

The rules are short:

  • A value that starts with @ is an expression. @pipeline().parameters.x is evaluated.
  • Inside longer text, wrap the expression in @{ }. This is called string interpolation, and the result is always a string.
  • Text values inside functions use single quotes: 'trips'. To write a single quote, double it: ''.
  • To write a literal @ at the start, type @@.

The dozen functions you need:

JobFunctions
Join or change text.concat, replace, toLower, toUpper, split
Dates.utcNow, formatDateTime, addDays
Logic.if, equals, greater, and
Lists and types.length, string, int

[125][126]

text
@concat('raw/trips/', formatDateTime(utcNow(), 'yyyy/MM/dd'), '/')
raw/trips/@{formatDateTime(utcNow(), 'yyyy/MM/dd')}/
@addDays(utcNow(), -1)
@if(equals(pipeline().parameters.load_type, 'full'), 'overwrite', 'append')
@activity('Lookup tables').output.value
@item().source_table
Common expressions in Northwind's pipelines. The first two build the same folder path in two styles.

[126]

[114][126]

A pipeline runs on 18 November 2026 and names its output file with this expression. What file name does it produce? @concat('trips_', formatDateTime(utcNow(), 'yyyy-MM-dd'), '.csv')

Pick one answer.

[126]

Lookup, ForEach and the metadata-driven pattern

Exam depth: know it cold.

A metadata-driven pipeline keeps the list of what to load in a table, not in the pipeline. To add a table, you add a row. Nobody edits the pipeline.

It takes three activities:

  1. Lookup activity reads the control table, a small table with one row per source table. Its output is firstRow when you ask for the first row only, or value, an array of all rows. It returns at most 5,000 rows and 4 MB.
  2. ForEach loops over that array. Set its Items to @activity('Lookup tables').output.value. Untick Sequential to run items in parallel, and cap how many at once with Batch count.
  3. Inside the loop, a Copy activity or a Notebook reads the current row with @item(), such as @item().source_table.

@activity('name').output reads the result of any earlier activity, by its exact name.

[108][126][128]

Rendering diagram…
One pipeline, any number of tables. The control table decides what runs.

[108][128]

A Lookup activity named Lookup tables reads 30 rows from Northwind's control table. The ForEach after it has Items set to @activity('Lookup tables').output.firstRow. It fails because Items isn't an array. Which value for Items fixes it?

Pick one answer.

[108][128]

30 copy-pasted pipelines vs. one pipeline and a 30-row table. Picture: Sticky-note sketch style: a cork board photographed straight on.

Passing parameters to a notebook

Exam depth: know it cold.

A notebook takes inputs through its parameter cell. Write a code cell with default values. Then open the cell's ... menu and select Toggle parameter cell. The cell now shows the label Parameters.

In the pipeline, open the Notebook activity's Settings tab. Under Base parameters, add one row per parameter: name, type and value. The value can be an expression, such as @item().target_table. Fabric fills in the list for you when the notebook has a parameter cell.

At run time, Fabric adds a new cell just below the parameter cell, holding the passed values. They overwrite the defaults.

  • Names must match exactly, including case.
  • Only simple types work: string, int, float and bool. Pass a list or dictionary as a JSON string, then read it with json.loads.
  • To send a value back, end the notebook with notebookutils.notebook.exit("done"). The value is always a string.

[54][110][112]

python
# Cell 1: marked with Toggle parameter cell. These are defaults.
table_name = "stations"
load_date = "2026-01-01"
# Cell 2: uses whatever values the pipeline passed in
df = spark.read.table(f"bronze_{table_name}")
df = df.filter(df.load_date == load_date)
df.write.mode("overwrite").saveAsTable(f"silver_{table_name}")
Cell 1 is the parameter cell. Cell 2 uses the values, whichever ones the pipeline passed.

[54]

A Fabric notebook with two code cells. The first cell sets LakehousePath and RawDataPath and carries a Parameters label. The cell's more-commands menu is open with Toggle parameter cell highlighted.
Microsoft Learn, CC BY 4.0
A Notebook activity on a pipeline canvas with its Settings tab open. Under Base parameters, two rows: LakehousePath, type String, value anotherLakehouse; and RawDataPath, type String, value @pipeline().TriggerTime.
Microsoft Learn, CC BY 4.0

[54]

A notebook's parameter cell sets table_name = "stations". In the pipeline's Notebook activity, a base parameter named TableName has the value trips. The run succeeds, but the notebook processes stations. What's wrong?

Pick one answer.

Library variables

Exam depth: recognize it.

A Variable library is a workspace item that holds named values for many items at once. Each variable can have different value sets, such as one for development and one for production. Pipelines, notebooks, Dataflow Gen2, Copy jobs and Eventstreams can all read it.

In a pipeline, you add a reference on the Library variables tab, then read it like this: @pipeline().libraryVariables.SourceLH. A schedule can also take a parameter value from a variable library.

How it differs from a pipeline variable: a pipeline variable lives inside one pipeline and changes during a run. A library variable lives outside, is shared, and changes per environment. Lesson 20 uses it with deployment pipelines.

[114][129][130][131]

Try it in Fabric

A free Fabric trial is enough. You need a workspace with a Pipeline and a Notebook.

  1. In the notebook, write table_name = "stations" in the first cell. Open the cell's ... menu and select Toggle parameter cell.
  2. In a second cell, write print(table_name). Save the notebook.
  3. Open the pipeline. Select the empty canvas, open the Parameters tab, and select + New. Name it table_name, type String, default trips.
  4. Add a Notebook activity. On its Settings tab, pick your notebook.
  5. Under Base parameters, find table_name. In Value, select Add dynamic content, then pick the table_name parameter. The box fills with @pipeline().parameters.table_name.
  6. Select Run. Open the notebook run's output: it prints trips, not stations.

[54][125]

Exam-style practice

A pipeline parameter row_count holds the number 42. A Teams message setting must show the text Loaded 42 rows. Which value produces it?

Pick one answer.

[126]

You are a data engineer at Northwind Rides. A ForEach loops over the control table's rows. Inside it, a Notebook activity must receive each row's target_table value as its table_name base parameter. What value should the base parameter have?

Pick one answer.

[54][108]

You are a data engineer at Northwind Rides. Partway through a run, a pipeline must remember whether any Copy activity loaded zero rows, then later choose a branch based on that. What should you use to hold the value?

Pick one answer.

[125][127]

FlashcardsIndex cardsFlashcards ⚡

Card 1 of 15

[54][108][112][125][126][127][128][131]

Worth keeping

  1. Parameters come in at run start and stay fixed; variables change during the run.
  2. A value starting with @ is an expression; inside text, use @{ } instead.
  3. Lookup's output.value is an array for ForEach; output.firstRow is one row.
  4. Inside a ForEach, read the current row with @item().
  5. Notebooks take values through a parameter cell and the activity's base parameters.

Every pipeline so far moves batches: a table, a file, a night's worth of trips. Northwind's scooters send an event every few seconds, all day, and the ops team wants them on a live map. Next lesson you meet the three engines Fabric uses for data that never stops.

Leaderboard

Loading…

50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.

Sources for this lesson (13)

Each fact in the lesson is marked with the number of the page it comes from.

  1. [4]Microsoft Learn: Study Guide for Exam DP-700
  2. [54]Microsoft Learn: Develop, execute, and manage Microsoft Fabric notebooks
  3. [108]Microsoft Learn: Transform data with a ForEach activity
  4. [110]Microsoft Learn: Transform data by running a notebook
  5. [112]Microsoft Learn: NotebookUtils notebook run and orchestration
  6. [114]Microsoft Learn: Run, schedule, or use events to trigger a pipeline
  7. [125]Microsoft Learn: Parameters for Data Factory in Microsoft Fabric
  8. [126]Microsoft Learn: Expressions and functions for Data Factory in Microsoft Fabric
  9. [127]Microsoft Learn: Use the Set Variable activity in Fabric
  10. [128]Microsoft Learn: Use the Lookup activity to look up data from a data source
  11. [129]Microsoft Learn: Variable library integration with pipelines
  12. [130]Microsoft Learn: What is a variable library?
  13. [131]Microsoft Learn: Tutorial: Use variable libraries to customize and share item configurations