|
Hello, Can anyone help me creating a SSIS package that unzips a file '.gz' as soon as it gets into the folder and loads the data into the tables. Thanks
(comments are locked)
|
|
You can use the command line 7z program to unzip this file through a script task in SSIS. Once unzipped, you can then define a data flow task and select your file as the source and your destination (if SQL Server then you can choose OLEDB Destination). You can also use the file system task control in SSIS to control what to do with the zipped file once unzipped and imported (like moving it to a processed folder of some sort, etc). Some previous questions and answers on "how to 7zip" http://ask.sqlservercentral.com/questions/35077/ssis-and-decompression http://ask.sqlservercentral.com/questions/31411/file-compression-ssis
Aug 25 '11 at 06:27 AM
KenJ
But the main concern is, the package has to copy the data from the file without unzipping it and load it in the SQL Server tables. Is it possible? If yes, can you please guide me through the steps.
Aug 25 '11 at 08:26 PM
zain001
Nothing can read a compressed file without first decompressing it in whole or in part. you can load the entire compressed file into a table as a single entity, but it will be the entire file in a single row and column - still compressed. It won't be useful data.
Aug 26 '11 at 06:16 AM
KenJ
(comments are locked)
|

