Hi,
I am reading a dataset and creating output XML.
Here is the XML output I am getting.
<Message>
<Main>
<Col1>18108</Col1>
<Col1>18108</Col1>
<Col1>18108</Col1>
<Col2>U00009473</Col2>
...............
</Main>
</Message>
First Column is repeting 3 times as the I have 3 rows present for that same key field.
I had used the key field that is specified in the dataset as the Trigger Column.
Can anyone please help me to get one row as Col1 in the XML output irrespective of duplicate rows.
Cheers
Debasis
Repetetive XML tags
Moderators: chulett, rschirm, roy
Hello Debasis,
Try removing duplicate rows and send only the one record and keep the same trigger column Col1 in your XML output stage.
Else you will have to change your Trigger column to some other unique tag this way the aggregation will happen at a different level, like if you choose <main> as a tag you will have only one <col1>. So you will have to search for a unique column.
hth,
a novice
Try removing duplicate rows and send only the one record and keep the same trigger column Col1 in your XML output stage.
Else you will have to change your Trigger column to some other unique tag this way the aggregation will happen at a different level, like if you choose <main> as a tag you will have only one <col1>. So you will have to search for a unique column.
hth,
a novice
There may be more to this than what we can see here, as we don't have lots of detail about your source, but here are a few things to try:
a) for your simple example above (create a test with only those two columns) make Col2 your "key" and choose Aggregate option in the xml output stage.
b) for a second and separate test, add a few more columns at the col2 level (just dummy columns for test purposes, added in an upstream transformer)...I've seen some odd things happen with aggregation when there are 4 or fewer cols........
Ernie
a) for your simple example above (create a test with only those two columns) make Col2 your "key" and choose Aggregate option in the xml output stage.
b) for a second and separate test, add a few more columns at the col2 level (just dummy columns for test purposes, added in an upstream transformer)...I've seen some odd things happen with aggregation when there are 4 or fewer cols........
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>