For each loop in adf

Vineet S 950 Reputation points
2024-07-18T16:11:55.0666667+00:00

I am running for each loop using look up activity so using look up activity I am getting all the files from blob storage but for each loop is running continuously.. It has 60 files but after getting from files... It is running again... Please screenshot for any solution

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

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 25,416 Reputation points
    2024-07-18T17:06:56.9733333+00:00

    If your "ForEach" loop is running continuously, it might be due to misconfiguration or a loop within the pipeline that's causing it to rerun.

    You need to configure the Lookup activity to point to your Blob Storage dataset where you esnure that the "First row only" option is disabled, as you need to retrieve all files.

    In the settings of the ForEach activity, set the "Items" field to @activity('LookupActivityName').output.value. This ensures that the ForEach activity will iterate over each item in the list of files retrieved by the Lookup activity.


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.