XML 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 stage

Post by sheema »

Hi ,

My job design is as follows

External Source Stage-----> Transformer-------->XML Input stage -------->sequential file.


The problem is we are not able to read the data properly with a single key.
When I download the metadata for the xml file,we have 5 columns which are specified as keys.
Can some one help me in this regard.

Thanks
Last edited by sheema on Wed Mar 11, 2009 9:07 am, edited 1 time in total.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Quick glance, it looks like there are at least 3 independently repeating paths..... comment, custom field list, and lineitem. Size is a sub repeating group of line item.

You do each in its own link...and one repeating element as "key" for each link.

Ernie
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 »

So I should have three more xml stages after i read from the first xml stage.Am I right?Can you explain me the below in little detail.

You do each in its own link...and one repeating element as "key" for each link.

I am totally new to the XML stage,so kindly help me out.

Thanks in Advance.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Do some searches...there are a lot of threads here on XML....there is a document referenced in many of the threads on Best Practices...it is at Kim Duke's web site....an absolute must read .....the doc on XML stages is good also.....I have a few bits on xml in my blog.

Each Link is a relational path thru your xml structure. So...for instance, you might have a single link for the lineitem and size elements, selecting one element from the size node for your repeating element. You need to import the structure via the XML metadata Importer (again, see the doc for more details). Your structure is fairly straightforward, so you shouldn't have too much problem. Start with something simple like just the header info, and then move into the repeating nodes.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
manu.dwhds
Participant
Posts: 30
Joined: Fri Sep 26, 2008 9:33 pm
Location: Bangalore

Re: XML stage

Post by manu.dwhds »

Hi , you need to use rowgenarator----------->Transformer--------->xmlinputstage--------->write datasets(how many you want outputs)

If your xml chunks are repeting take it as a key coloum and write into separe datasets (For Every key you need to take separate dataset) Then only you are able to read that reapeted chunks .
Manu
Post Reply