Home > Net >  Unzip zip files within a zip file in Azure Data Factory
Unzip zip files within a zip file in Azure Data Factory

Time:01-11

The situation is that a zip file contains multiple zip files inside of it, I would like to essentially unzip 2 layers within ADF. Nearly all videos/guides only have one zip file that needs to unzipped so I am not sure what to do.

When I unzip the outer zip file inside the folder contains a binary file that is not useful

CodePudding user response:

Azure Data Factory provides several built-in activities for working with zip files. The two most commonly used activities are:

Copy activity: This activity can be used to copy a file or folder from a source to a destination. Execute a command activity: Allows you to execute a command line as part of your pipeline. In order to unzip files within a zip file in ADF, you can use a combination of these two activities:

Use the Copy activity to copy the outer zip file to a blob storage. Use the Execute a command activity to unzip the outer zip file, which will result in a folder containing the inner zip file. Use the Copy activity again to copy the inner zip file to another location. Use the Execute a command activity to unzip the inner zip file, which will result in the final unzipped files. You can use tools like 7-zip or WinRar to unzip the files, but those tools needs to be installed on the machine where the data factory pipeline runs. Alternatively you can use PowerShell script, azure function activity to unzip the files as well.

  • Related