Function splitter1 = new RegexSplitter( new Fields( "num1", "char1" ), " " );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter1 );
pipeLower = new Each( pipeLower, new Insert( new Fields( "one", "two", "three", "four" ), "one", "two", "three", "four" ), Fields.ALL );
pipeLower = new GroupBy( pipeLower, new Fields( "num1" ) );
pipeLower = new Every( pipeLower, new Fields( "char1" ), new First(), Fields.ALL );
Function splitter2 = new RegexSplitter( new Fields( "num2", "char2" ), " " );
Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter2 );
pipeUpper = new GroupBy( pipeUpper, new Fields( "num2" ) );
pipeUpper = new Every( pipeUpper, new Fields( "char2" ), new First(), Fields.ALL );
Pipe splice = new CoGroup( pipeLower, new Fields( "num1" ), pipeUpper, new Fields( "num2" ) );
Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );