Unzip files from a ZIP file and use them as source in an ADF Copy activity

Viewed 367

I see there is a way to deflate a ZIP file but when there are multiple .csv files within a ZIP, how do I specify which to use as my source for copy activity? It is now parsing both csv files and giving as a single file and I'm not able to select the file I want as source

1 Answers

According to my test, we can't unzip .zip file in the ADF to get the file name lists in the ADF dataset. So, i provide below workaround for your reference.

Firstly, you could use Azure Function Activity to trigger a function which is for the decompression of your zip file.You only need to get the file name list then return it as an array.

Secondly, use ForEach Activity to loop the result, to get your desired file name.

Finally, inside ForEach Activity, please use @item() in the Dataset to configure the specific file path so that you could you could refer it in the copy activity.

Related