Alternative way of Foreach loop in ADF

Poddar, Ankur 21 Reputation points
2022-03-24T05:49:43.74+00:00

Hello,

I have 70K records with distinct id, I have to loop for distinct id and based on that copy the data from API to Database.
I can achieve this by For each loop, but i wont think so its ideal to run for each loop for this many times.

Could you please suggest some alternative and efficient way to achieve the same, which will be really helpful.

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

1 answer

Sort by: Most helpful
  1. Pratik Somaiya 4,211 Reputation points Volunteer Moderator
    2022-03-24T06:18:16.407+00:00

    Hello @Poddar, Ankur

    There's Until Activity in ADF wherein you can set an expression which evaluates to True or False, based on the result of expression, it will loop

    This is similar to do-until loop: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-until-activity

    But in your case, you can also create a Custom Activity by writing a custom code to loop and it can also poll the API

    https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-custom-activity

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.