0
votes

I've a requirement like: I've three folders in azure blob container, and inside those three folders have three zip files and the zip files contains respective source files (*.csv) with same structure. I want to loop through the each folders and extract each of the zip files into an output folder then I want to load all the three csv files into target sql table. How can I achieve this by using azure data factory?

Azure storage account
      productblob (blob container)
            Folder1 >> product1.zip >> product1.csv
            Folder2 >> product2.zip >> product2.csv
            Folder3 >> product3.zip >> product3.csv

I've already tried to loop through the folders and got the output in Foreach iterator activity but unable to extract the zip files.

1

1 Answers

0
votes

After looping to ForEcah activity, you could follow the following steps:

  • Select a binary dataset and give file path as Foreach output(by creating a parameter in Dataset and in Source defining the value to this parameter). Select compression type as ZipDeflate.
  • In the sink, select the path where you want to save the unzipped files. (Select Flatten hierarchy in Sink if you want only the files.)