0

I have an on-prem file storage, there I have a folder named 'India'. Inside 'India', there are 36 folders with all the state/union teritory names. I want to build a copy data pipeline that takes a parameter for state names, and while copying it will exclude the folder names given in the parameter.

for example, if I give 'Kerala', it will exclude Kerala. If I give 'Kerala','Karnataka','Odisha' it will exclude them while copying.

Thanks.

I treid using a filter condition, but not sure how to use it properly. So need some help.

1 Answers1

0
  • You can use filter in the following way. First create an array parameter of the folder names that you don't need.

enter image description here

  • Use getmetadata activity the list of folders. The following is the output of my get metadata activity with childitems:

enter image description here

  • Now, use filter in the following way with dynamic content values similar to what is given below:
items: @activity('Get Metadata1').output.childItems
condition: @not(contains(pipeline().parameters.reject,item().name))

enter image description here

  • This would give result as shown in the below final image.

enter image description here

Saideep Arikontham
  • 5,558
  • 2
  • 3
  • 11
  • Hi, Thanks for your answer . Can you please let me know how to use foreach and the copy data so that the folerds and their files would get copied to the destination?. I am new to Azure, so facing some challenges. – Prasenjit Patnaik May 16 '23 at 14:38
  • Hey @PrasenjitPatnaik, if you don't have any issues regarding the above approach (your requirement as stated in the question), accept this solution as and raise a new question. – Saideep Arikontham May 17 '23 at 03:59