<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=931099456970389&amp;ev=PageView&amp;noscript=1">

Nesting ForEach Loops in Data Factory (1)

If you’re working in Azure Data Factory or are just starting out with it, today I’m here with a quick design tip when it comes to Azure Data Factory pipelines.

In a scenario where you’re using a ForEach activity within your pipeline and you wanted to use another loop inside your first loop, that option is not available in Azure Data Factory. If you look at the screenshot below, you can see that the option to add an additional ForEach loop is not available.

NestingForEachLoopsDataFactory

So, here’s my design tip – if you have a scenario where you want to do a loop inside a loop, you would need to create an additional pipeline as a separate object. And in that second pipeline is where you would put your second loop.

Again, looking at my screenshot, I’m working in the context of one ForEach loop and so this pipeline will be executed one time for each item in my list but that pipeline, in turn, is where I have an additional ForEach loop.

Hope you find this quick design tip helpful if you run into this scenario. If you have more questions around Azure Data Factory or the Azure cloud platform, you’re in the right place. Click the link below or contact us—we’re here to help no matter where you are on your cloud journey.

New Call-to-action
bg-img14.jpg

Join Our Blog

Join thousands of other SQL Server, BI and cloud pros by subscribing to our blog.

Leave a comment

Posts by Topic

see all

Recent Articles

Popular Articles