Copying Data From Azure Data Factory

Rohit 61 Reputation points
2020-09-14T08:42:12.967+00:00

Hi Team,

I am copying data between 2 storage accounts but i usually comes in situtaion like where i need to copy data from multiple folders or multiple files .. as shown in screenshot i have 5 parameters to which i provide value at run time. as shown in that in "Source_file_name"
i want to pass multiple files by separating them using comma.

i can do this by passing json array or sql table. but i wanna check like can we accomplish this task according to my requirement.

Regards,
Rohit.

24447-image.png

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

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee
    2020-09-14T23:05:28.177+00:00

    Hello ,
    After reading the post again , i see that you mentioned about passing a json array and SQL table . I think you can do something more simple by using the split function and turn the filenames like "a.txt,b.txt, c.txt" ( this is what you are passing a parameter ) to array which you can use with a foreach . In have defined a "FilerNames" as an variable of type array and the split function will split the file names(s) and insert that in the array . Once in the array we will iterate the filenames and execute the
    copy activity . I am inserting an animation below which should help .

    24701-copyissue.gif

    Do let me know if you have any questions .

    Thanks
    Himanshu

    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    3 people found this answer helpful.