Rhino ETLAggregates
SoWell, that turned out to be really simple. Check out a simple RowCount:
transform CountRows: Context.Items.RowCount = 0 unless Context.Items.RowCount Context.Items.RowCount+=1 RemoveRow()
OnComplete: SendRow( Row(RowCount: Context.Items.RowCount) )
And then we have a more complex one, summing two columns:
transform CalcSumOfSalaryAndId: unless Context.Items.IdSum: Context.Items.IdSum = 0 Context.Items.SalarySum = 0 Context.Items.IdSum+=Row.Id Context.Items.SalarySum+=Row.Salary RemoveRow() OnComplete: SendRow( Row( IdSum: Context.Items.IdSum, SalarySum: Context.Items.SalarySum ) )
So, basically we have an initialization section, processing, and when all the processing is done, you can send new rows downward in the pipeline.
More posts in "Rhino ETL" series:
- (16 Oct 2007) Importing Data into MS CRM
- (13 Aug 2007) Writing to files
- (05 Aug 2007) Web Services Source
- (05 Aug 2007) Transactions
- (04 Aug 2007) Targets
- (04 Aug 2007) Aggregates
- (26 Jul 2007) Thinking about Joins & Merges
- (24 Jul 2007) First Code Drop
Comments
Comment preview