my source flat file has many rows per customer,
but I need to transfer it to database with only one row per customer and accumulated sales (and probably do other calculations and lookups).
I understand how to do stuff with derived columns, but how can I read source file first, calculate, group and then save to database?
As I understand, the script offers only processing row by row: Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Thanks
Vlad
won't A Flat file source and aggregation transform suffice your needs?
Rafael Salas
|||I tried this, but I do not think it would help :-(
it is more complicated calculation, than just grouping.
I would rather do it in the script load into a Collection, loop, calculate, replace, substitute etc. and then save to database.
|||Well you know your data...good luck with that!
Rafael Salas
|||The Aggregate transformation does more than Group By. You don't want to do this in script. You can do SUM, AVG, MIN, MAX with the Aggregrate Transformation. If you need to then do something else combine the Derived Column Transformation with it.
http://msdn2.microsoft.com/en-US/library/ms138031.aspx
No comments:
Post a Comment