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
Copy file name to clipboardExpand all lines: articles/data-factory/control-flow-for-each-activity.md
+5-99
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.workload: data-services
12
12
ms.tgt_pltfrm: na
13
13
14
14
ms.topic: conceptual
15
-
ms.date: 11/26/2018
15
+
ms.date: 01/23/2019
16
16
ms.author: shlo
17
17
18
18
---
@@ -232,6 +232,7 @@ It's possible to iterate over multiple activities (for example: copy and web act
232
232
}
233
233
234
234
```
235
+
235
236
### Example
236
237
**Scenario:** Iterate over an InnerPipeline within a ForEach activity with Execute Pipeline activity. The inner pipeline copies with schema definitions parameterized.
237
238
@@ -466,108 +467,13 @@ It's possible to iterate over multiple activities (for example: copy and web act
466
467
]
467
468
468
469
}
469
-
470
470
```
471
-
## Aggregating metric output
472
-
Expression for gathering the output of all the iterations of a ForEach is `@activity('NameofInnerActivity')`. For example, if a ForEach Activity iterated over a "MyCopyActivity," the syntax would be: `@activity('MyCopyActivity')`. The output is an array, with each item giving details about a specific iteration.
473
471
474
-
> [!NOTE]
475
-
> If you want details about a specific iteration, the syntax would be: `@activity('NameofInnerActivity')[0]` for the latest iteration. Use the number in the brackets to access the specific iteration of the array. To access a specific property of a specific iteration, you would use: `@activity('NameofInnerActivity')[0].output` or `@activity('NameofInnerActivity')[0].pipelineName`.
To aggregate outputs of __foreach__ activity, please utilize _Variable_s and _Append Variable_ activity.
569
475
570
-
```
476
+
First, declare an `array`_variable_ in the pipeline. Then, invoke _Append Variable_ activity inside each __foreach__ loop. Subsequently, you can retrieve the aggregation from your array.
0 commit comments