Repetition Elements in XML

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ankursaxena.2003
Participant
Posts: 96
Joined: Mon May 14, 2012 1:30 pm

Repetition Elements in XML

Post by ankursaxena.2003 »

Hi,
Here I have a huge XML with so many repetition elements like,

<admin>
<quoteback name="caseId">SHAWN AABROWN</quoteback>
<quoteback name="caseId">BROWN</quoteback>
<date_request_completed>08/15/2012</date_request_completed>
<date_request_completed>15/2012</date_request_completed>
</admin>
<claim number="5456767" sequence_number="1" unit_number="1">
<claim number="465476578" sequence_number="2" unit_number="1">

Is there a way apart from separating the XML chunks and placing a separate XML input stage for each of the repetition element. As I said there are 30 repetition elements in the XML and placing so many XML input stages and integrating the data is really tough.
Thanks,
Ankur Saxena
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What exact version are you running? Is this a server job (as marked) or a parallel job (as posted)? No point our trying to guess this information, which will affect the answer we give.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ankursaxena.2003
Participant
Posts: 96
Joined: Mon May 14, 2012 1:30 pm

Post by ankursaxena.2003 »

Ray,
Currently I designed a server job(8.5), But if there is any possible solution on designing a parallel job then I will go ahead with it.
Thanks,
Ankur Saxena
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Each repeating node needs its own "output link"....not its own stage. You can have one xmlInput Stage (or xml stage for anyone reading this that has 8.5+ and wants to use the xml stage) with as many output links as you want...... you want to parse the xml only once...but each separate repeating node needs its own link --- as though it was its own relational table...one might have (say) 3 rows and the other might have 300.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Each repeating node needs its own "output link"....not its own stage. You can have one xmlInput Stage (or xml stage for anyone reading this that has 8.5+ and wants to use the xml stage) with as many output links as you want...... you want to parse the xml only once...but each separate repeating node needs its own link --- as though it was its own relational table...one might have (say) 3 rows and the other might have 300.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

You can do it with single XML input stage and use 30 output links(each link is having one XML chunk) and In metadata descritpion tab provide the correct path.
Srinu Gadipudi
Post Reply