/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

  1. import System
  2. aggregate distinct_product_names:
  3. groupBy name
  4. accumulate:
  5. aggregate.name = row.name
  6. aggregate join_product_names:
  7. accumulate:
  8. aggregate.names = [] if aggregate.names is null
  9. aggregate.names.Add(row.name)
  10. terminate:
  11. aggregate.result = string.Join(", ", aggregate.names.ToArray(string))
  12. process WireOnRowProcessedEventProcess:
  13. rowProcessed:
  14. row["name"] = "chocolate" if row["name"] == "milk"
  15. # we get the products from the unit test
  16. distinct_product_names()
  17. join_product_names()
  18. # we output the result to the unit test