How can I append the name of all files in Folders and Sub-Folders inside the same Variable in Azure Data factory?


I have a requirement in Azure Data Factory where there are files in Folders and Sub-Folders. I have highlighted the structure of the same below for reference.

I want to Understand how I can use an Array Variable and append all the filenames inside the variable and set the array as the variable's Value.

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

1 answer

Sort by: Most helpful
  1. Nandan Hegde 31,511 Reputation points MVP

    You can use Get metedata activity to get the list of all files within a folder.
    In case of sub folders, reiterate over the new path.
    Then iterate it over via For activity and use Append variable activity to append the file names in an Array variable