You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the calling pipeline-child pipeline paradigm, you can use the [Set Variable activity](control-flow-set-variable-activity.md) to return values from the child pipeline to the calling pipeline. In the following scenario, we have a child pipeline through [Execute Pipeline Activity](control-flow-execute-pipeline-activity.md). And we want to __retrieve information from the child pipeline__, to be sebsequently used in the calling pipeline.
18
+
In the calling pipeline-child pipeline paradigm, you can use the [Set Variable activity](control-flow-set-variable-activity.md) to return values from the child pipeline to the calling pipeline. In the following scenario, we have a child pipeline through [Execute Pipeline Activity](control-flow-execute-pipeline-activity.md). And we want to __retrieve information from the child pipeline__, to then be used in the calling pipeline.
19
19
20
20
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-00-paradigm.png" alt-text="Screenshot with ExecutePipeline Activity.":::
21
21
22
22
Introduce pipeline return value, a dictionary of key value pairs, that allows communications between child pipelines and parent pipeline.
23
23
24
-
## Pre-requesite - Calling a Child Pipeline
24
+
## Prerequisite - Calling a Child Pipeline
25
25
26
-
The pre-requesite of the use case, is that you have an [Execute Pipeline Activity](control-flow-execute-pipeline-activity.md), calling a child pipeline. It is important that we enabled _Wait on Completion_ for the activity
26
+
The prerequisite of the use case, is that you've an [Execute Pipeline Activity](control-flow-execute-pipeline-activity.md), calling a child pipeline. It's important that we enabled _Wait on Completion_ for the activity
27
27
28
28
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-01-execute-pipeline-setting.png" alt-text="Screenshot setting ExecutePipeline Activity to wait for completion.":::
29
29
30
30
31
31
## Configure Pipeline Return Value in Child Pipeline
32
32
33
-
We have expanded the [Set Variable activity](control-flow-set-variable-activity.md) to include system variables _Pipeline Return Value_. You do not need to define them at pipeline level (as opposed to any other variables you use in the pipeline).
33
+
We've expanded the [Set Variable activity](control-flow-set-variable-activity.md) to include system variables _Pipeline Return Value_. You don't need to define them at pipeline level (as opposed to any other variables you use in the pipeline).
34
34
35
35
1. Search for _Set Variable_ in the pipeline Activities pane, and drag a Set Variable activity to the pipeline canvas.
36
-
1. Select the Set Variable activity on the canvas if it is not already selected, and then its **Variables** tab, to edit its details.
36
+
1. Select the Set Variable activity on the canvas if it isn't already selected, and then its **Variables** tab, to edit its details.
37
37
1. Choose _Pipeline return value_ for variable type.
38
-
1.Click_New_ to add a new key value pair.
39
-
1. You can add resonable ammount of key value pairs, bounded by size limit of returning json.
38
+
1.Select_New_ to add a new key value pair.
39
+
1. You can add reasonable number of key value pairs, bounded by size limit of returning json.
40
40
41
41
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-02-child-pipeline.png" alt-text="Screenshot shows the ui for pipeline return value.":::
42
42
@@ -48,12 +48,12 @@ String | The most straight forward of all. It expects a string value.
48
48
Expression | It allows you to reference output from previous activities.
49
49
Array | It expects an array of _string values_. Press "enter" key to separate values in the array
50
50
Boolean | True or False
51
-
Null | Signal place holder status; the value will be constant _null_
51
+
Null | Signal place holder status; the value is constant _null_
52
52
Int | It expects a numerical value of integer type
53
53
Float | It expects a numerical value of float type
54
-
Object | __Warning__very complicated use cases only. It allows you to embed a list of key value pairs type, i.e. json, for the value
54
+
Object | __Warning__ complicated use cases only. It allows you to embed a list of key value pairs type for the value
@@ -63,16 +63,17 @@ Object Type are defined as follows:
63
63
64
64
## Retrieving Value in Calling Pipeline
65
65
66
-
The pipeline return value of the child pipeline will become the activity output of the Execute Pipeline Activity. You can retrieve the information with _@activity('Execute Pipeline1').output.pipelineReturnValue.keyName_. The use case is limitless.
67
-
68
-
For instance, you may use an _int_ value from child pipeline to define the wait period for a [wait activity](control-flow-wait-activity.md), or a _sting_ value to definet the URL for the [Web activity](control-flow-web-activity.md), or _expression_ payload to a [script activity](transform-data-using-script.md) for logging purposes.
66
+
The pipeline return value of the child pipeline becomes the activity output of the Execute Pipeline Activity. You can retrieve the information with _@activity('Execute Pipeline1').output.pipelineReturnValue.keyName_. The use case is limitless. For instance, you may use
67
+
* An _int_ value from child pipeline to define the wait period for a [wait activity](control-flow-wait-activity.md)
68
+
* A _sting_ value to define the URL for the [Web activity](control-flow-web-activity.md)
69
+
* An _expression_ value payload for a [script activity](transform-data-using-script.md) for logging purposes.
69
70
70
71
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-03-calling-pipeline.png" alt-text="Screenshot shows the ui for pipeline return value.":::
71
72
72
-
There are 2 noticeable call outs in referencing the pipeline return values.
73
+
There are two noticeable call outs in referencing the pipeline return values.
73
74
74
75
1. With _Object_ type, you may further expand into the nested json object, such as _@activity('Execute Pipeline1').output.pipelineReturnValue.keyName.nextLevelKey_
75
-
1. With _Array_ type, you can specify the index in the list, with _@activity('Execute Pipeline1').output.pipelineReturnValue.keyName[0]_. The number is zero indexed, meaning that it starts with 0.
76
+
2. With _Array_ type, you can specify the index in the list, with _@activity('Execute Pipeline1').output.pipelineReturnValue.keyName[0]_. The number is zero indexed, meaning that it starts with 0.
76
77
77
78
> [!NOTE]
78
79
> Please make sure that the _keyName_ you are referencing exists in your child pipeline. ADF expression builder can _not_ confirm the referential check for you.
@@ -84,7 +85,7 @@ You may have multiple Set Pipeline Return value activities in a pipeline. Howeve
84
85
85
86
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-04-multiple.png" alt-text="Screenshot with Pipeline Return Value and Branching.":::
86
87
87
-
To avoid missing key nissing situation in the calling pipeline, described above, we encourage you to have the same list of keys for all branches in child pipeline. Please consider using _null_ types for keys that doesn't have values, in a specific branch.
88
+
To avoid missing key situation in the calling pipeline, described above, we encourage you to have the same list of keys for all branches in child pipeline. Consider using _null_ types for keys that don't have values, in a specific branch.
88
89
89
90
## Next steps
90
91
Learn about another related control flow activity:
0 commit comments