Scenario:
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.
Instead of using Process Task is there any method we can use to load zip files in SSIS?
ReplyDeleteYes,with ther help of script task and you can use C# or VB coding !
DeleteI think SSIS is always the best and most useful component to provide more solutions and ideas to complex IT problems.
ReplyDeleteSSIS Postgresql Read
Đặt vé máy bay tại Aivivu, tham khảo
ReplyDeletesăn vé máy bay giá rẻ đi Mỹ
vé máy bay từ mỹ về vn
đặt vé máy bay từ đức về việt nam
vé máy bay từ nga về việt nam bao nhiêu
vé máy bay từ anh về việt nam vietnam airlines
chuyến bay từ pháp về việt nam hôm nay
giá khách sạn cách ly
chuyến bay chuyên gia trung quốc
The above solution is not working for me . I am getting error as " [Execute Process Task] Error: In Executing "C:\Program Files\7-Zip\7z.exe" "x D:\xxx\xyx 2.zip -oD:\xxx" at "", The process exit code was "2" while the expected was "0". "
ReplyDeleteI am using Visual studio 2019 version
I received this error also for same package. "The process exit code was "7" while the expected was "0". " Kindly do the needful.
ReplyDelete