Loading XML file data into a Seq. file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bachi
Participant
Posts: 28
Joined: Sun May 25, 2008 7:02 am

Loading XML file data into a Seq. file

Post by bachi »

I have a xml file that needs to be loaded into a seq file for further transformations. I'm unable to get any output from the XML Input stage.

My first stage is a sequential file stage where I have specified a column name "Input" as LongVarChar. This is followed by a XML Input stage and a target Sequential file.

In the input tab of the XML Input stage, I choose the following-
XML source column = "Input"
Column content = XML document

In the output tab of XML Input stage, I choose one o/p column as a repetition element.

I also gave a reject link to the XML Input stage. When I run this job, no rows are loaded into the target sequential file and many rows are rejected. When I try to view the data in the reject file, it shows the following error -
XML input document parsing failed. XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 6): There are more end tags than start tags

Please help.
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

On the DataStage distribution CD there are xml-sample, install them and make similar jobs. That is a good first step and a great help.
Wolfgang Hürter
Amsterdam
bachi
Participant
Posts: 28
Joined: Sun May 25, 2008 7:02 am

Post by bachi »

I dont have the installaiton CD as i'm working on client machine through a remote connection.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So your client has the CD. Get them to make the samples available. That way no-one violates their license agreement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bachi
Participant
Posts: 28
Joined: Sun May 25, 2008 7:02 am

Post by bachi »

Thats the only way to read xml file
bachi
Participant
Posts: 28
Joined: Sun May 25, 2008 7:02 am

Post by bachi »

Give me some other solution its(cd installtion) a very big process
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your first stage should be a Folder stage, not the Sequential. How did you generate the metadata you are using for the XPath Expressions in the XML stage?
-craig

"You can never have too many knives" -- Logan Nine Fingers
bachi
Participant
Posts: 28
Joined: Sun May 25, 2008 7:02 am

How to provide 2 or more Repetition Keys in XML input stage?

Post by bachi »

ok as u said I used folder stage but I am facing new problem
I have used a XML input stage to extract data from a XML file to a sequential file. In th XML input stage, I have the option of providing only a single repetition key.

How can I provide multiple repetition keys in the XML input stage as I have more than 1 primary key in the XML file?

Please help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply