sml schema decoding issue

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
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

sml schema decoding issue

Post by India2000 »

Hi,

I have a scenario where I need to decode a .xsd which is refering to another xd in it. I used xml stage with schema library to decode the outer xsd. in tabular form.Inner xsd is decoding as xml message in the output.
I tried to decode this xml message again with the same processes..I dont get any rows in the out of the second xml stage. Can any one direct me how to resolve this issue?


<Schema1>
<NAME>xyz</NAME>
<NAME1>abc</NAME1>

<Schema2>

<Name>xyz</Name>
<Name2>zzzz</Name2>

</Schema2>

</Schema1>

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

Post by eostic »

Could be lots of things, but the example here would indicate that the xsd for "schema1" actually contains (at least) the element for "schema2" (with the rest being undefined... often xs:any ).

Lots of ways to handle this....pass the schema2 details out as a chunk, and process it with another xml stage downstream (useful if you are ever processing that same schema2 in its own job and can re-use or otherwise share the stage)....

...but the easiest is just to have another xml Parser step, this one using a different library definition for the root...use the chunk from the initial parser step in the second.

In either case, if you are getting zero rows there are lots of possible reasons....the xsd could be wrong, or the chunk could be invalid, or you might be trying to retrieve data from two different levels and one of them is missing, etc. etc.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

Thanks Eostic, and what you're saying is correct.. What I did is separately decoded the innner xml response. I could extract all the elements.
Post Reply