Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unzip .gz file from network map drive and load into table (SQL 2012) Expand / Collapse
Author
Message
Posted Wednesday, November 20, 2013 10:50 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, June 22, 2016 8:22 AM
Points: 64, Visits: 221
Hi,

The aim of this exercise is to

- unzip the xml file (*.xml.gz file) from network map drive
- load into table (xml file) in xml column with name of the file in different column.


Can you please tell me what SSIS tools I can use to achieve this or some sample packages I can refer to.

Thanks for your help in advance.
Post #1516140
Posted Wednesday, November 20, 2013 1:49 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, March 30, 2016 3:20 PM
Points: 626, Visits: 1,058
Hi
I simply use 7-zip for that:

Configure Execute Process Task with settings

Executable: C:\Program Files\7-Zip\7zG.exe
Arguments: -wc:\TEMP e \\SERVER\share\myfile.tgz
WorkingDirectory: \\SERVER\share

Ofc you need to run package on user account with proper permissions to shared folder.

Sorry, but your next problem is not too clear for me to make a good suggestion.

Regards
Mike
Post #1516190
Posted Wednesday, November 20, 2013 2:34 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 18, 2015 1:14 PM
Points: 2, Visits: 81
I think I got what you are saying.
Thanks.
Post #1516219
Posted Friday, November 29, 2013 12:43 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, May 26, 2016 3:00 AM
Points: 1,069, Visits: 1,943
If I understand correct, read the file name using a script task and assign the name to a variable.

Follow this: http://stackoverflow.com/questions/5152671/how-to-load-an-xml-file-into-a-database-using-an-ssis-package


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1518457
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse