Forum Discussion

Ishank22's avatar
Ishank22
Copper Contributor
Jan 18, 2024

How can I run multiple instances of all the values going in the FOREACH simultaneously?

Hi,

My Problem Statement -

a>. How can I run the multiple values passed to my ForEach simultaneously?

 

Description:- The Lookup widget (1st Widget) passes multiple values. I want a way to run all the values passed by the look up to run simultaneously (i.e. run the child pipeline).

Thanks for your ideas in advance! If there is a better way to do this please let me know.

3 Replies

  • Ishank22 you can use the ForEach activity to run all the values the Lookup widget passes simultaneously.
    - Create a Linked Service and Dataset.
    - Create a parameter of relativeURL with respective values.
    - Read the data by the Lookup activity, and use the code below to iterate over the values inside the ForEach activity using their indexes.

    @range(0,length(pipeline().parameters.relativeURL))

    Unfortunately, nested loops are not allowed in Azure Data Factory.

     

    You can learn more at
    https://learn.microsoft.com/en-us/azure/data-factory/control-flow-for-each-activity


     Let me know if this works for you. @ me in replies, or I'll lose your thread!!!  
    Note: 

    Do my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
     
    Best Regards,
    Dallas.

Resources