Codernator
Codernator

Reputation: 39

Execute an ADF pipeline inside ForEach

I have a pipeline that is connecting to an SFTP, then uses ForEach activity to iterate through the files and sink them into my Azure Blob Storage. Inside the ForEach, I need to execute another pipeline that is dependent on a parameter which is the file name.

I cannot figure out how to bring the name over inside the ForEach. The copy data activity inside the ForEach doesn't have a property for me to add a parameter.

My question is how can I pass the file name over to Execute the pipeline inside the ForEach activity?

Thank you

enter image description here

enter image description here

Upvotes: 0

Views: 355

Answers (1)

Rakesh Govindula
Rakesh Govindula

Reputation: 11529

My question is how can I pass the file name over to Execute the pipeline inside the ForEach activity?

I do agree with @Chen Hirsh's comment. As you want to pass the file name to the child pipeline, you need to pass the @item().name to it from the iterations of the Get meta data activity child items array.

After creating the string parameter in the child pipeline, pass the current file name to the created parameter like below in the Execute pipeline activity.

enter image description here

In the child pipeline, you can use the parameter @pipeline().parameters.pipelineFileName as per your requirement.

enter image description here

Upvotes: 0

Related Questions