Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In data mapper, I have an input file like
id;zipcode
1;44100
1;44200
2;69002
2;56410
2;56100
I would like to be able to do a "group by" according to the id and get such an output files:
<Root>
<id>1</id>
<Zips>
<Zipcode>44100</Zipcode>
<Zipcode>44200</Zipcode>
</Zips>
<id>2</id>
<Zips>
<Zipcode>69002</Zipcode>
<Zipcode>56410</Zipcode>
<Zipcode>56100</Zipcode>
</Zips>
</Root>
I tried many options but don't manage to do that... In other editor mapping tools, it is possible, but with data mapper I cannot find any way to do it.
Any suggestion ?
NB:I want to do that in data mapper not in tXmlMap.
Regards.
Eric
I'm struggeling by implementing a group by functionality as well. Unfortunately the example files above are not available any longer. Has anyone a hint for me, how I can group some subnodes by property and then to calc the sum?
The file has the structure below. I would like to group by the 'positionNumber' and then sum up the quantities, in this case 55 + 100 (first and third sub-node)
<ns:positions>
<ns:position positionNumber="1">
<ns:quantityFirstChoice>55</ns:quantityFirstChoice>
</ns:position>
<ns:position positionNumber="2">
<ns:quantityFirstChoice>55</ns:quantityFirstChoice>
</ns:position>
<ns:position positionNumber="1">
<ns:quantityFirstChoice>100</ns:quantityFirstChoice>
</ns:position>
</ns:positions>