XML Pack 2 bug
Posted: Mon Mar 19, 2012 12:51 am
Hi Folks,
We are encontering a problem with xml files that contain nested records (repeating groups). Datastage is pretty much fabricating data for fields that don't appear accross all the records of a repeating group.
For example, the file below contains 2 addresses for the customer 55000. The second address doesn't contain the zip attribute, so if you process this file using the XML input stage in order to extract the 2 addresses (key=address id) into a sequencial file, you will end up with 2 records, and the second record will have the zip attribute added and the content will be the same as the last one's. I would've expected to see the attribute created with null, but that's not the case. Interestingly, we have datastage v6.0 here with xml pack1.0, and it works ok, I mean the attribute gets created with null content. Not sure if this issue wast introduced by xml pack 2 or by datastage 8.5.
Any thoughts?
<?xml version="1.0"?>
<customers>
<customer id="55000">
<name>Charter Group</name>
<address id="1">
<street>100 Main</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address id="2">
<street>720 Prospect</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address>
<street>120 Ridge</street>
<state>MA</state>
</address>
</customer>
</customers>
We are encontering a problem with xml files that contain nested records (repeating groups). Datastage is pretty much fabricating data for fields that don't appear accross all the records of a repeating group.
For example, the file below contains 2 addresses for the customer 55000. The second address doesn't contain the zip attribute, so if you process this file using the XML input stage in order to extract the 2 addresses (key=address id) into a sequencial file, you will end up with 2 records, and the second record will have the zip attribute added and the content will be the same as the last one's. I would've expected to see the attribute created with null, but that's not the case. Interestingly, we have datastage v6.0 here with xml pack1.0, and it works ok, I mean the attribute gets created with null content. Not sure if this issue wast introduced by xml pack 2 or by datastage 8.5.
Any thoughts?
<?xml version="1.0"?>
<customers>
<customer id="55000">
<name>Charter Group</name>
<address id="1">
<street>100 Main</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address id="2">
<street>720 Prospect</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address>
<street>120 Ridge</street>
<state>MA</state>
</address>
</customer>
</customers>