Hi, I have a flat file source going into a script component which manipulates some values and puts those values in a flat file destination. What I now need to do is total a column within the script component and add that value as a row to the destination. At the moment data from source looks something like
ABC, 3
DEF, 5
FGH, 6
I have a variable in script component holding the running total I now want to add that to destination as a row e.g.
ABC, 3
DEF, 5
FGH, 6
Total, 14
This is probably very easy but I don't now how to add the Total row via the component. At the moment all rows are manipulated in the ProcessInputRow sub of component and output column values are assigned here. How do I add the Total row as I need to do this once last input row is complete.
Thanks
You'll need to use an asynchronous output to accomplish this. You could add an async output in addition to the synchronous output you get by default, and just write the running total to it.
See this topic in Books Online:
"Creating an Asynchronous Transformation with the Script Component"
|||You could also just use a multicast and an Aggregate transform to accomplish the same thing.|||Great thanks, Asynchronous Transformation worked
No comments:
Post a Comment