Issue in XML Hierarchical 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
vcsasikala
Participant
Posts: 26
Joined: Wed Jun 20, 2007 1:13 am
Location: Chennai

Issue in XML Hierarchical stage

Post by vcsasikala »

Hi,
For Validation of Output XML files we have used XML Parser followed by multiple Switch Step in Assembly editor of XML hierarchical data stage. The parser stage will do the validation and reject the invalid records. Since we have 4 different hierarchies we used 4 switch stage to filter each hierarchy's valid and invalid records based on the parsing status.

The issue is, if any one of the records in any of the hierarchies is incorrect the job aborts and rest of the records remain unhandled. Suppose in "account hierarchy" I have 5 xml records, if the 3rd record is invalid xml then the job aborts without even sending the first 2 records to valid link.

Regards,
Sasi VC
Regards,

Sasikala V C
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It may depend on how horribly invalid the incoming xml is...... certain kinds of errors are capturable without aborting the Job. You'll have to experiment with it, capturing the errors and warnings based on the fine grained settings within the Assembly. Really serious structure problems that abort the Job may not be avoidable.

....one thing you might want to experiment with though --- play with the xmlInput Stage. It has some validation capabilities also that aren't as fine grained in controls, but also might not be as strict....... you might be able to mix and match based on your requirements.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chanaka
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 15, 2009 4:06 am
Location: United States

Re: Issue in XML Hierarchical stage

Post by chanaka »

Hi Earny or other experts,

Is there any way to capture the problematic records from the XML hierarchy stagy by directing them to a flat-file as in other processing stages?

Cheers!

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

Re: Issue in XML Hierarchical stage

Post by eostic »

Sorry for the late reply. I remember setting up Assemblies where I would force validation, and then be able to send the entire incoming payload (the whole row of xml content) to a separate reject link --- and if not, it would go to second instance of the Hierarchical Stage to be processes. It wouldn't let me identify a single element of failure, but at least I could send out the entire row (whole document). Unfortunately, since the Flash issue, I havenh't been able to use the Stage anymore, so I can't look at old examples to share ideas.

Ernie
Ernie Ostic

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