Unzip .tar.gz files in SSIS - ssis

I have a .tar.gz file. Now i need to unpack these files with SSIS package. Previously did unzip and delete for .zip files with the help of For each container and script task. Not sure how to do it for .tar.gz files. Any help?

You can use an execute process task to achieve this (or using process from Script task), but you have to install a ZIP application like 7Zip or Winzip or else. And use command line to Zip or Unzip archives.
Follow one of these links for more details:
Zip a folder using SSIS
7Zip command line examples
What command line parameters does WinZip support?

Related

Unzip Seleted files using winzip SSIS

I am able to unzip all files using below command in SSIS processTask.
Executable: c:\Program Files\PKWARE\PKZIPC\pkzipc.exe
Arguments: -extract -overwrite "C:\MyFolder\xyz.tar.gz" "c:\MyFolder\"
there are multiple file in the zip folder and unzipping process is extracting files in alphabetical(a-z) order but I want to unzip selected files on custom order.

How to create a transaction log on WinSCP on SSIS package

I have SSIS package, which uses winscp to execute some commands in a text file to upload files to a FTP site. I use DTExec.exe to execute this SSIS package. Right now, I need to show winscp FTP log including display file name uploaded on FTP site. Does someone know how to capture the log? I use '>' and it does not work.
WinSCP can generate its own log using /log command-line switch (or /xmllog):
winscp.com /script=script.txt /log=winscp.log
If you want to just capture WinSCP console output:
Make sure you are using winscp.com, not winscp.exe.
Run winscp.com via cmd.exe, as that is what understands the >.
cmd.exe /C winscp.com /script=script.txt > winscp.log
In both cases, you will typically need to use full paths to all files (winscp.com, script.txt, winscp.log).

How to read csv files with beaker notebook?

I use Beaker on Windows and start it up with gitbash with the following command:
./beaker.command.bat
If I want to read a .csv or excel file I have to place it in the same directory as the beaker.command.bat.
How can I just the .csv files directly from their original location where the .bkr notebook script and the files are located?
I figured it out, just use the full directory path instead pointing to the file.

How to seperate out ERROR FILE from Correct file using SSIS and archive them

I have a scenario where there are two source file ABC.txt and DEF.txt. i want to make sure that if any files are present in that folder with naming convention as ABC.txt, it has to be moved to the different folder prior to loading to the SQL server, and the other (incorrect file) should be moved to a error log folder (separate folder). Can someone advice what task would i use to do that. i tried it using File system task but it just allow you to move or copy files from one location to other prior to loading the file.can someone advice how to i copy that incorrect file to the different folder ( error log folder)?
try to use a bat file.
move ABC.txt /directory
and after
xcopy "source" "destination_err\" /exclude:%temp%\ABC.txt /y
or you can use robocopy command in bat file, this is the command with parameters http://itsvista.com/2007/03/robocopy/

7z executable in SSIS

How do I implement an execute process task to extract all files in a directory using 7z. exe in SSIS ?
I am trying to unzip all files in a certain directory using 7z executable but it gives a process error code 2.
Make sure you are specifying a WorkingDirectory rather than specifying the full path for the file in the arguments.