Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

package for zip files. Expand / Collapse
Author
Message
Posted Wednesday, November 7, 2012 6:29 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, January 17, 2014 7:01 PM
Points: 91, Visits: 464
I have files which are saved in the web folder.and i get the file in the web folder every day which is in zipped format.Now i want to download the file from web folder which is in csv format and then unzip that file and load that to the table .The file comes with the date at the last (for e.g for today it is james_2012_11_07 and tomorrow it will be james_2012_11_08).Now, i want to create the package which should first download the .csv file then unzip that after that i want to upload that unzip file to the table ever day.How i can create that package?.
Post #1382229
Posted Wednesday, November 7, 2012 9:10 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, April 27, 2014 8:38 PM
Points: 90, Visits: 420
weston_086 (11/7/2012)
I have files which are saved in the web folder.and i get the file in the web folder every day which is in zipped format.Now i want to download the file from web folder which is in csv format and then unzip that file and load that to the table .The file comes with the date at the last (for e.g for today it is james_2012_11_07 and tomorrow it will be james_2012_11_08).Now, i want to create the package which should first download the .csv file then unzip that after that i want to upload that unzip file to the table ever day.How i can create that package?.


Not sure if i understand all of what you wanted so if you can clear up a few things be helpful.

Process

1 . Web folder has a file. Is it zipped or is it a CSV file? you've mentioned it is both??? I'm assuming its a .zip and when unzipped it is a CSV file.

2. You want to download the file from the web folder to a folder on your hard drive? Is the web folder a FTP or just a shared folder (assuming it's a shared folder)

3. Unzip the File so it is a CSV.

4. The CSV file is labelled "James_YYYY_MM_DD"

5. You then want to put that CSV file into your Table?


So basically you want a SSIS package that will do the above automatically? If thats correct then you will need to

1. Create a SSIS package with a File System Task editor that moves/copies the zip file from 1 folder to another folder.

2. Create a Process Task editor that unzips the files (use gZip.exe with its command lines to do this)

3. Create a Flat File Connection Manager for that CSV file to be picked up automatically (most likely it will be a variable cause of the date changing)

4. Data flow task puts the CSV into ETL tables (Raw table -> Staging table)

5. Simple stored proc to insert from Staging to Live.


the above probably isn't correct just based on assumptions.



Post #1382250
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse