Unable to implement getmetada and foreach , copy actvity

Krishnamohan Nadimpalli 401 Reputation points

I have a source which has 3 files in the folder


I want to iterate through them and use copy activity to put them into sql db. Sink side only one table.

Problem is on the source side to get the file name. Following are the settings

GetMetadata Activity Dataset settings


ForEach Activity settings:

Copy Source dataset settings


Copy Source Settings:

But I am unable to get filename in the source.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,488 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Suba Balaji 11,186 Reputation points


    Inside foreach loop, you need use under source file name parameter


    This will be bringing the filename of each file while the loop iterates through files.

    You may refer this video, which does something similar.

    Please write, in case you need more clarity.