/Rhino.Etl.Tests/Integration/SplitName.cs
http://github.com/ayende/rhino-etl · C# · 20 lines · 19 code · 1 blank · 0 comment · 0 complexity · 6b164e2ded5deddf17ad7f40eccdbbca MD5 · raw file
- namespace Rhino.Etl.Tests.Integration
- {
- using System.Collections.Generic;
- using Core;
- using Rhino.Etl.Core.Operations;
- public class SplitName : AbstractOperation
- {
- public override IEnumerable<Row> Execute(IEnumerable<Row> rows)
- {
- foreach (Row row in rows)
- {
- string name = (string)row["name"];
- row["FirstName"] = name.Split()[0];
- row["LastName"] = name.Split()[1];
- yield return row;
- }
- }
- }
- }