November 24, 2010 at 8:01 am
I'm loading a fixed-length text file with 10 columns into a SQL table. All the mappings are complete and working. Now I want to store the value of a package variable (FileID) in each row as well. I know this is a simple request, but could someone point me in the right direction.
November 24, 2010 at 8:07 am
Add a derived column transformation into your data flow - set its value as required and then map it to the desired destination column, same as all your other columns. If that's not enough to get you there, please post back and I'll provide more detail.
November 24, 2010 at 8:33 am
I added a Derived Column Task to the Data Flow and when I edit it I get the informational message "This component has no available input columns." I did edit it, however, and used my package variable as the Expression. The Derived Column Name is FileID and the Derived Column is <add as a new column>. At this point I don't know how to connect the task up. In my data flow I just have a Flat File Source and the connecting green arrow to the Destination Connection.
November 24, 2010 at 8:36 am
Delete that green arrow.
Then connect source to derived column and derived column to destination (use green connectors).
Then amend your mappings. The new derived column should be available as an extra source column.
November 24, 2010 at 8:44 am
Got it. The disconnect for me was understanding that by deleting the green Data Flow Path I wasn't actually deleting all the column to column mappings previously completed since they were "safe" in the Destination Mappings.
Thanks for the help!
November 24, 2010 at 8:48 am
No problem, thanks for posting back.
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply