How to use Variable inside Pipeline expression builder to insert multiple list of items all together

King Java 790 Reputation points
2023-04-07T18:22:28.6466667+00:00

I am trying to make ADF pipelines dynamic by reducing the pipelines and trying to combine all into one. I have a step (Copy data) inside ADF where it grabs a csv file using some Pipeline expression as shown below. User's image

So, instead of naming each one like "Location1" on separate pipeline, I would like to have some type of Variable to insert into this location. Some of each location would be like: Location1 Location2 Location3... What would be the step?

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

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Subashri Vasudevan 11,226 Reputation points
    2023-04-08T07:58:07.7266667+00:00

    Hello @King Java One way we could do is to declare an array variable with ['location1','location2','location3']. Then looping over this array variable in a foreach loop. Inside foreach loop, you could place your copy activity and parameterize as below

    @concat(item().name,formatDateTime(utcNow,'yyyyMMdd'),'*','.csv')

    Please try this and let us know for further questions on this

    0 comments No comments

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.