SSIS - How To Unzip .Zip Files In SSIS [ How To Use Execute Process Task In SSIS ]


We download .zip file from FTP site to our computer and then we need to unzip this folder and load all the files in folder to our destination tables.

Solution :

After downloading the .zip file we have to unzip it, to unzip the file we will use Execute Process Task. The executable that we will use to unzip is 7z.exe

Step 1:
Create variables in SSIS Package for Executable location, Zip file location and Uncompressed folder location.

Step 2:
In your SSIS Package, Drag Execute Process Task from Toolbox to Control Flow Pane.
Double Click on Execute Process Task and then go to Expressions Tab.
Under the properties set Executable=@[User::VarExecuteablePath]
and in Arguments set = "x "+ @[User::VarZipFilePath]+" -o"+ @[User::VarUnzipFolderPath]
Click on evaluate expressions and then click OK.
Step 3:
Right Click on Execute Process Task and go to Properties. Set DelayValidation=True

Final Output : 
After executing our SSIS Package we can see that the .zip file is uncompressed to our given folder.

No comments:

Post a Comment