Denormalize input file

I’ve read this forum topic:merging lines in input file and looked at the two examples:
http://wiki.clovergui.net/examples/graphDenormalizeInline.grf
http://wiki.clovergui.net/examples/graphDenormalizeTL.grf
but I can’t figure out how to make it work. The examples seem to only dedupe the data.

As per the post I mentioned above, I want to take:
group1,record1
group1,record2
group2,record1
group2,record2
group2,record3

and transform to:
group1,record1,record2
group2,record1,record2,record3

Can anyone help me out here?

Thanks in advance!

<?xml version="1.0" encoding="UTF-8"?>
<Graph author="avackova" created="Mon May 05 08:57:00 CEST 2008" guiVersion="1.9" id="1209974901675" licenseType="Evaluation license." modified="Mon May 05 10:26:02 CEST 2008" modifiedBy="avackova" name="Denormalize" revision="1.18">
<Global>
<Metadata id="Metadata0">
<Record fieldDelimiter="|" name="data" recordDelimiter="\n" type="delimited">
<Field name="group" type="string"/>
<Field name="value" type="string"/>
</Record>
</Metadata>
</Global>
<Phase number="0">
<Node id="DATA_GENERATOR0" pattern="group1
" randomFields="value=random(&quot;2&quot;,&quot;5&quot;)" recordsNumber="10" type="DATA_GENERATOR"/>
<Node id="DENORMALIZER0" key="group" type="DENORMALIZER">
<attr name="denormalize"><![CDATA[//#TL
              string members="";
  
              function addInputRecord() {
                members = concat(members,$value,";");
              }
 
              function getOutputRecord() {
				string value = members;
				members = "";
                $group := $group;
                $value := value;
              }]]></attr>
</Node>
<Node id="EXT_SORT0" sortKey="group(a)" type="EXT_SORT"/>
<Node debugPrint="true" id="TRASH0" type="TRASH"/>
<Edge fromNode="DATA_GENERATOR0:0" id="Edge0" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (out)" toNode="EXT_SORT0:0"/>
<Edge fromNode="DENORMALIZER0:0" id="Edge1" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (out)" toNode="TRASH0:0"/>
<Edge fromNode="EXT_SORT0:0" id="Edge2" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (out)" toNode="DENORMALIZER0:0"/>
</Phase>
</Graph>

Node Denormalizer for each group with the same key (the same value of group data field) creates string containing all passed values; when whole group is read, it creates one output record putting on group data field value from group data field (the same for whole group) and on the value data field created string. For proper working Denormalizer needs sorted input.