unzip only csv files from my zip file

Dallabrida, Eduardo 21 Reputation points

I have a zip file that contains multiples csv and txt files. But I only need the csv files. is there a way to unzip only those csv files?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
8,025 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaktiSingh-MSFT 9,561 Reputation points Microsoft Employee

    Hi @Dallabrida, Eduardo ,

    Welcome to Microsoft Q&A platform and thanks for using Azure services.

    As I understand your ask, you have zip file which contains csv and txt extension files, and you want to unzip only csv files.
    Please correct if my understanding does not comply.

    This task can be accomplished in Azure Data Factory using two Copy activities.

    Pipeline would look like this:


    Steps are as follows:

    . First connect to the Source dataset as shown here:


    Browse to the Input Zip file location as a Binary Dataset, use Compression Type as ZipDeflate and Compression Level as Optimal.

    . Next set the Sink dataset as below:


    This step would Decompress/Unzip and Copy all csv and txt files from Source to Sink.

    . Next step is to consider only "csv" files from the Sink of above step.
    For this we will take another copy activity and connect to the Sink location of the previous step here as source as:

    Here in wildcard file path, we will mention the folder path with type of file as *.csv which will consider all files ending with .csv.

    . Finally create the final Sink dataset for this Copy activity as below:


    Thank you!

    Hope this will help. Please let us know if any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification

0 additional answers

Sort by: Most helpful