Skip to content

Commit 6f72240

Browse files
Merge pull request #289816 from whhender/patch-722591
Adding parameter examples
2 parents 57ae0b4 + 4193400 commit 6f72240

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

articles/synapse-analytics/synapse-notebook-activity.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,17 @@ To parameterize your notebook, select the ellipses (...) to access the **more co
6060

6161
[![screenshot-showing-azure-notebook-toggle-parameter](./media/synapse-notebook-activity/azure-notebook-toggle-parameter-cell.png)](./media/synapse-notebook-activity/azure-notebook-toggle-parameter-cell.png#lightbox)
6262

63-
Azure Data Factory looks for the parameters cell and uses the values as defaults for the parameters passed in at execution time. The execution engine will add a new cell beneath the parameters cell with input parameters to overwrite the default values.
63+
Define your parameters in this cell. It can be something as simple as:
64+
65+
```python
66+
a = 1
67+
b = 3
68+
c = "Default Value"
69+
```
70+
71+
You can reference these parameters in other cells and when you run the notebook to use the default values you specify in the parameters cell.
72+
73+
When you run this notebook from a pipeline, Azure Data Factory looks for the parameters cell and uses the values you provided as defaults for the parameters passed in at execution time. If you [assign parameters values from a pipeline](#assign-parameters-values-from-a-pipeline), the execution engine will add a new cell beneath the parameters cell with input parameters to overwrite the default values.
6474

6575

6676
### Assign parameters values from a pipeline
@@ -69,6 +79,11 @@ Once you've created a notebook with parameters, you can execute it from a pipeli
6979

7080
[![screenshot-showing-assign-a-parameter](./media/synapse-notebook-activity/assign-parameter.png)](./media/synapse-notebook-activity/assign-parameter.png#lightbox)
7181

82+
>[!TIP]
83+
>Data Factory won't automatically populate the parameters. You need to add them manually. Be sure to use the exact same name in both your parameters cell in the notebook and the base parameter in the pipeline.
84+
85+
Once you've added your parameters to your activity, Data Factory will pass the values you specify in your activity to your notebook, and your notebook will run with those new parameter values, instead of the defaults you specified in the parameters cell.
86+
7287
When assigning parameter values, you can use the [pipeline expression language](../data-factory/control-flow-expression-language-functions.md) or [system variables](../data-factory/control-flow-system-variables.md).
7388

7489

0 commit comments

Comments
 (0)