SSIS package that unzips a '.gz' file and loads into tables


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.


more ▼

asked Aug 25, 2011 at 04:45 AM in Default

avatar image

61 7 7 7

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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).

more ▼

answered Aug 25, 2011 at 05:53 AM

avatar image

1.3k 75 104 147

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, 2011 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, 2011 at 06:16 AM KenJ
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Aug 25, 2011 at 04:45 AM

Seen: 3449 times

Last Updated: Aug 25, 2011 at 04:45 AM

Copyright 2018 Redgate Software. Privacy Policy