Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i'm currently searching for a solution to my use case.
Here is the thing. I have a temporary csv file filled from a SQL function. Each line outputs values with a '|' delimiter.
Example :
ThingId | ThingName | JoinNestedId | JoinNestedName
1 | Foo | 10 | NestedFoo
2 | Foo2 | 11 | NestedFoo2
2 | Foo2 | 12 | NestedFoo3
However, when I want to map these lines into a tAdvancedFileOutputXML, the entity with id = 2 is split.
<mylistofthings>
<thing>
<id>1</id>
<name>Foo</name>
<nestedobjects>
<nestedobject>
<id>10</id>
<name>NestedFoo</name>
</nestedobject>
</nestedobjects>
</thing>
<thing>
<id>2</id>
<name>Foo2</name>
<nestedobjects>
<nestedobject>
<id>11</id>
<name>NestedFoo2</name>
</nestedobject>
</nestedobjects>
</thing>
<thing>
<id>2</id>
<name>Foo2</name>
<nestedobjects>
<nestedobject>
<id>12</id>
<name>NestedFoo3</name>
</nestedobject>
</nestedobjects>
</thing>
</mylistofthings>
The nestedobjects field is set as a Group, the nestedobject field is set as a Loop.
I tried tUnite, tFileOutputMSXML, tAggregateRow, tUniqRow, tSurviveFields. It seems that none of these components fits my use case, unless you contradict me.
How can I ensure that the thing with id = 2 has one single list of nestedobjects with both id 11 and 12, like this ?
<thing>
<id>2</id>
<name>Foo2</name>
<nestedobjects>
<nestedobject>
<id>11</id>
<name>NestedFoo2</name>
</nestedobject>
<nestedobject>
<id>12</id>
<name>NestedFoo3</name>
</nestedobject>
</nestedobjects>
</thing>
Hi have you try the component tWriteXmlField with the group by option ?
Send me love and kudos