x
login about faq Site discussion (meta-askssc)

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

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

more ▼

asked Aug 25 '11 at 04:45 AM in Default

zain001 gravatar image

zain001
61 6 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 '11 at 05:53 AM

Slick84 gravatar image

Slick84
1.3k 71 102 142

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

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x749
x25

asked: Aug 25 '11 at 04:45 AM

Seen: 1275 times

Last Updated: Aug 25 '11 at 04:45 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.