ADF ForEach parallel processing and subsequent pipeline dependencies

Khawaja, Ahsan 1 Reputation point
2020-11-09T10:19:37.183+00:00

Hello,

I have a ForEach loop which executes 8 items in "Parallel" so "sequential" property of ForEach loop is set to false. ForEach activities further call another pipeline.

38288-adf.jpg

38209-image.png

38392-image.png

I want to execute subsequent activities only when all 8 items (looping in ForEach loop) have finished executing, but it looks like ForEach is passing on completion on execution of first item out of 8, I have also added a wait activity after ForEach and set it "WaitOnCompletion" assuming this will cause of all ForEach 8 times to be finished but even then it seems like it is still doing same.

any help would be appriciated.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,477 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,376 Reputation points Microsoft Employee
    2020-11-12T23:32:12.04+00:00

    Hello Ahsan ,

    It took me sometime to figure the things out , as it is only visible in triggers runs .

    In my case I have the FE activity , inside that I have a setvariable activity , simple :) .
    Outside an execute pipeline which points to pipeine which adds a delay . Lets talk on the start time mentioned on UI . I am adding the snapsot as I see in my case , hope this helps .

    39449-ahsan1.png

    In the snapshot , if you add Run start for foreach #1 which is 3:04:00 PM with the the duration which is 00:00:12 ( pt#3) , then the 3:04:12 (pt#4) . for some reason it is wrongly called out as 3:04:13PM in #2 . More if I click the foreach hyperlink in the above snapshot is takes me to the below snaphot and it is very clear and convincing .

    39457-ahsan2.png

    In the above snapshot , you can see that the the foreach is running in parallel and and the delay activity is only initiated when foreach is done . In this snapshot the timing is correct

    pt#1 + pt#2 < pt#3

    Do let me know if this helps .

    Thanks Himanshu

    Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.