XML Input Stage

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
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

XML Input Stage

Post by sheema »

Hi,

I have a XML which has 8 hierarchy levels and each level has elements which are repeating. I achieved this by defining 8 XML Input stages (i.e one XML stage for each repeating group) and got the required output.
But the problem I am facing is I have to tie back all these outputs together and load them into a single table.
How can I get all of the rows together into a single table.
I tried Join(Inner) but I was wrong it gave me too many rows.

Can Some one guide me how to get this done.
Thanks

Sheema
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Putting together multiple independent nodes requires that you build it in pieces... search thru the forum to find references to Kim Duke's website and a document he keeps there called Best Practices for XML.....a document written by one of our developers several years ago. Nice document that describes a variety of techniques, one of which is how to go about constructing separate nodes and putthing them together.

Ernie

...btw...you can also do the work at the source with one stage and 8 separate output links.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

Hi Ernie,

I tried out using a single XML stage with diffrent outputs and worked perfectly as desired.I will look into Kim Dukes best practices and try to merge the records.Thanks for pointing me in right direction.
Thanks

Sheema
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

I have tried the option where we pass XML from 1 XML stage to 2 XML stage etc.My job design is as below

XML Input1--->XML Input2----->XML Input3------->XML Input 4-------->XML Input5----->XML Input6------->Sequential File

In each of these XML stages I select a column as repetition element and then pass the remaining XML chunk to the next stage and do the similar process in other XML stages

But I am getting the below warning

Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error ;Expected comment or processing instruction
Thanks

Sheema
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hard to say... most likely a typo or other error in the Description property. Check all the columns. Be sure that the columns parsed by a prior XMLInput Stage have NOTHING in the Description property.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply