XML Parser 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
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

XML Parser Issue

Post by venkatvelpula »

Hi,

I am trying to use new XML parser stage to parse the XML file and write that into a dataset. Part of the configuration, How do we input the document root?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

You first have to "import" your xml schema defintion (xsd) via the "Library Manager" (you'll see this tab inside the stage assembly, or at the DS Designer main canvas when you do Import....Table Definitions)....

Once you have the xsd properly imported, you will be able to select the docuement root. Open a sample document and look at the very first element...that is generally your root.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

eostic wrote:You first have to "import" your xml schema defintion (xsd) via the "Library Manager" (you'll see this tab inside the stage assembly, or at the DS Designer main canvas when you do Import....Table Defin ...
I couldn't see full message..could you allow me to look at the full message?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...the answer is in the content that you can see.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

I have imported XML table definitions but trying to provide document root to configure XML stage to parse the input file.

How import table definitions related to the document root?
satisht
Participant
Posts: 15
Joined: Tue Nov 07, 2006 4:41 pm

Post by satisht »

The document root should be the top level element that you are parsing. Lets say if there is a envelope, header and body in the message. If you want to parse the Envelope you should select Envelope in the root and in the next parse step if you want to parse the header then you shiould choose Header as the root and so on...The root can be selected by using the Browse option...
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...import the xsd to a Library (not via xml table definitions).
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

can you tell me how to create the xsd to a library whican can be later accessed from xml stage?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

if you don't have one, you'll need to create one. One way is to look for "trang". ...or use the old xml Stages. If you don't have an excessive amount of volume, or you don't have an xsd or the detailed requirements (like deep validation) that would demand one, then use xmlInput.

That has its own learning curve, but it's probably simpler than trying to tackle xsd's for the first time while also learning a new Stage.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

Finally, I have created XSD and pointing that for document root. I am fine with this. When I am running the job, I am encountering no issues but not getting anything on the ouput.

Try to use test data funtion to see assembly editor configuration works. Could you provide how can we test the parser settings inside the stage? How to provide test data and see the results with in the stage?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Change your validation setting...it's probably on minimal. That may help find the problem.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

I figured out the issue. Everything working fine. Thanks for your help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please share the resolution. That's what DSXchange is about. If someone else gets the same problem in the future, your solution will be there for the searching! :)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply