Author |
Topic |
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-17 : 11:00:10
|
Hi all, educational question onlyI've got the connection manager prepped for a flat file, but need to output to THREE tables, which component do I need for this?Jake |
|
X002548
Not Just a Number
15586 Posts |
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-17 : 11:52:53
|
I'm guessing you mean the Bulk Insert task. Del; ?? |
|
|
X002548
Not Just a Number
15586 Posts |
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-17 : 14:30:55
|
Name DOB Country Address 1 Address 2 Address 3 PostCode Total Spend $Jane Doe 05-19-2000 United Kindgom 15 High Street London W2 3PX -1584.55About 10 rows in total. |
|
|
X002548
Not Just a Number
15586 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-17 : 14:58:33
|
quote: Originally posted by Jake Shelton Hi all, educational question onlyI've got the connection manager prepped for a flat file, but need to output to THREE tables, which component do I need for this?Jake
you can use multicast to create a copies of resultset and link it to various outputs and map only required columns.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-18 : 12:36:56
|
quote: Originally posted by visakh16
quote: Originally posted by Jake Shelton Hi all, educational question onlyI've got the connection manager prepped for a flat file, but need to output to THREE tables, which component do I need for this?Jake
you can use multicast to create a copies of resultset and link it to various outputs and map only required columns.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Thanks, I added a Flat File source and linked it to the Connection Manager, then linked the source to a new Multicast component, but it isn't picking up the input columns? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-20 : 12:07:40
|
why? did you try connecting multicast output to destination and checking metadata?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-22 : 13:24:44
|
Hi Visakh, yes that did the trick, but I have another question.I need to ensure that the 3 destination tables have ID fields (probably best to use PK's), but the only option in the SS Destinations is a small 'Keep Identity' tickbox, which I don't think is enough.Should I configure these in SSIS? Or do I need to set the tables up in Studio?Edit - I just realised I can use an Execute SQL task to drop/recreate the tables. That's what I get for not clicking on the 'Control Flow' tab.:) |
|
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-22 : 19:14:56
|
Hi all, I just wanted to see if I'm going the right way.....In the Control Flow tab:Bulk Insert Task - this copies everything from a text file into a new staging table;Execute SQL - On success of above, this performs data cleansing (I've yet to add code to it)Data Flow tab:Ole DB Source - Connects to the newly cleansed data;Multicast - On success of above, splits out the appropriate columns to three destination tables (which already exist)SQL Server Destination x 3 - |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-23 : 09:10:28
|
quote: Originally posted by Jake Shelton Hi all, I just wanted to see if I'm going the right way.....In the Control Flow tab:Bulk Insert Task - this copies everything from a text file into a new staging table;Execute SQL - On success of above, this performs data cleansing (I've yet to add code to it)Data Flow tab:Ole DB Source - Connects to the newly cleansed data;Multicast - On success of above, splits out the appropriate columns to three destination tables (which already exist)SQL Server Destination x 3 -
sounds fineonly clarification needed is where are destination dbs. Are they in same machine where SSIS runs? if not,you've to use OLEDB destination instead------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Jake Shelton
Yak Posting Veteran
74 Posts |
Posted - 2012-02-24 : 06:19:02
|
For educational purposes, yes the SS destinations are on the same machine, but I take your point. I should add that now I need to ensure the destinations drop/recreate the SQL tables and autopopulate an ID column upon every iteration, then export the data with the new ID's to Excel sheets. |
|
|
|