Skip to content

Commit 38dbbf4

Browse files
authored
Adding parameter examples
1 parent 0ad0784 commit 38dbbf4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ 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+
Define your parameters in this cell. It can be something as simple as:
64+
65+
```python
66+
a = 1
67+
b = "Default Value"
68+
c = ""
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. When Data Factory runs the notebook the execution engine will add a new cell beneath the parameters cell with input parameters to overwrite the default values.
74+
6375
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.
6476

6577

@@ -69,6 +81,11 @@ Once you've created a notebook with parameters, you can execute it from a pipeli
6981

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

84+
>[TIP]
85+
>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.
86+
87+
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.
88+
7289
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).
7390

7491

0 commit comments

Comments
 (0)