How to decompress a zip file in Azure Data Factory v2

后端 未结 2 1997
臣服心动
臣服心动 2021-01-27 10:25

I\'m trying to decompress a zip file (with multiple files inside) using Azure Data Factory v2. The zip file is located in Azure File Storage. The ADF Copy task just copies the o

相关标签:
2条回答
  • 2021-01-27 10:56

    If you don't want to lose the names of the files within your zip, use the Copy activity but set the Copy Behavior to "Preserve hierarchy". This will create a folder with the name of your zip file, and the files will be inside with their original names.

    Zip Copy Behavior

    0 讨论(0)
  • 2021-01-27 11:22

    This can be achieved by having a setting "ZipDeflate" compression type in your source data set and in the sink data set of Copy activity you don't need to specify any compression configuration (Compression type is "none").

    In the Copy activity sink settings, please set the copy behavior to "Flatten Hierarchy" to unzip and write the individual files.

    When the Copy behavior is set to "Flatten Hierarchy", all the files from zipped source file are extracted and written to destination folder mentioned in the sink dataset as individual files by renaming the files to data_SomeGUID.csv.

    In case if you do not specify the copy behavior (set to "none") in copy activity, then it decompress ZipDeflate file(s) and write to file-based sink data store, files will be extracted to the folder: //.

    Please refer to this doc to know about the Compression support in Azure data factory: https://docs.microsoft.com/azure/data-factory/supported-file-formats-and-compression-codecs-legacy#compression-support

    0 讨论(0)
提交回复
热议问题