Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Data Flow Destination columns copying to Data Flow Transformation Output


Data Flow Destination columns copying to Data Flow Transformation Output

Author
Message
brewmanz
brewmanz
Mr or Mrs. 500
Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)

Group: General Forum Members
Points: 503 Visits: 406
Preamble
=======
I want to take one Table and transform its Columns into another Table - many times for different tables. Each Table's Columns are completely independently named. I am using a Data Flow Transformation Script Component to do this.
The (extremely simplified) Script would look something like:

Dim sa() as string
'Col43 is one of 50 to 90 input columns
'Name1, Name2, Name3 = 3 of 50 to 90 output columns
sa = Row.Col43.Split(',')
Row.Name1 = sa(0)
Row.Name2 = sa(1)
Row.Name3 = sa(2)

Problem
======
My problem is ... how can I get those columns from the Data Flow Destination - OLE DB Destination AUTOMATICALLY mapped into the Data Flow Transformation - Script Component, ready to use?

Currently I'm typing them one at a time (anywhere from 50 to 90) in Script Transformation Editor - Inputs and Outputs - Output 0 - Output Columns - Add Column with Datatype/Length, whilst looking at the Destination Table definition.

There HAS to be way to automate this ... isn't there?
You know - a "copy OLE DB Destination External Columns to Script Transformation Output Columns" button?

TIA

Brewmanz
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search