/Rhino.Etl.Tests/Dsl/WireRowProcessedEvent.boo
http://github.com/ayende/rhino-etl · Boo · 26 lines · 18 code · 8 blank · 0 comment · 3 complexity · 20c4f738bae8a2c058268f55eace37a1 MD5 · raw file
-
- import System
-
- aggregate distinct_product_names:
- groupBy name
- accumulate:
- aggregate.name = row.name
-
- aggregate join_product_names:
- accumulate:
- aggregate.names = [] if aggregate.names is null
- aggregate.names.Add(row.name)
-
- terminate:
- aggregate.result = string.Join(", ", aggregate.names.ToArray(string))
-
- process WireOnRowProcessedEventProcess:
-
- rowProcessed:
- row["name"] = "chocolate" if row["name"] == "milk"
-
- # we get the products from the unit test
- distinct_product_names()
- join_product_names()
- # we output the result to the unit test