I have a flat file in which a record has been split to multiple lines for legacy reasons. I need to map this file such that the output combines the split records into one.
Here is an example input file. Each record contains an item number, sub item number, and description, separated by pipes.
012345|00|Sub Item 00 Description Part 1
012345|00|Sub Item 00 Description Part 2
012345|00|Sub Item 00 Description Part 3
012345|01|Sub Item 01 Description Part 1
012345|01|Sub Item 01 Description Part 2
012345|02|Sub Item 02 Description
And I need the mapped result to be
012345|00|Sub Item 00 Description Part 1 Sub Item 00 Description Part 2 Sub Item 00 Description Part 3
012345|01|Sub Item 01 Description Part 1 Sub Item 01 Description Part 2
012345|02|Sub Item 02 Description
Where the sub item numbers are the same, I want to combine those records into one.
Is this possible using just a map and the looping functoids? I am trying to avoid writing a custom pipeline component to accomplish this.
Any hints would be appreciated.