Reg. XML Input

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

raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Reg. XML Input

Post by raj_konig »

Folks,

I am working on XML input to load data from XML file to DB2.

I have gone thru the forum and got some information with that i did the job. I am successfull in compiling the job. But when I tryto run this its a success but i am not able to load data into the target table.

my job is as follows:

FOLDER--->XML INPUT---->DATABASE TABLE

I set the folder stage with only 2 columns as this is not accepting more than 2 and one of them is a key. and for this the NLS is set to NONE.

IN XML INPUT i am not validating the i/p XML file and loaded the name space decalration from table definitions of XML file.

I checked "Repitition Element Required" and set my key field.In advanced tab i have laoded the stylesheet thru URL/FilePath.

My database NLS is set to UTF-8(As specified in PDF)

when I run this i can c the reocrds are read from folder stage to XML input stage but 0 rows are instered from XML Input to DAtabase table.

Please help me out

Thanks in advance

rajesh
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

The following is the error I am getting when I log the reject error:

"XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure"

How could I solve this.

Thanks in Advance
rajesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Raj,

have you tried opening up the XML document in your xml-enable browser or by using one of the many structure-checking utilities available on the market to make sure that your document is well-formed?
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

It seems that XML is not formed correctly.

--Balaji S.R
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

I opend it in Internet Explorer. It seems fine.

How can I check whether the input XML is correctly formatted or not?

Thanks,
rajesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There are so many ways available to check this. Try using this web page to cut-and-paste your XML to see if it is well-formed. I suspect that it isn't.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

When you can open the XML correctly in IE means that your xml is right otherwise IE would specify error.

--Balaji S.R
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

Thank you Arndw for providing information.

I checked my file with that of the link u provided. it says well formed.

So wht could be the error? :?


rajesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you try making a copy and changing the job to work without the folder stage and loading the one XML you already checked to see if the error remains?
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

XML input should have one input stage. if I remove this folder stage, job will throw an error.

or else can i replace this folder stage with any other stage?

rajesh
vijayindukuri
Participant
Posts: 66
Joined: Fri Nov 25, 2005 7:55 am

Post by vijayindukuri »

Hi
Have u imported the fields using xml meta data importer and let me know what have u done in your xml input stage .
Thank you
vijay
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I would normally suggest just using a sequential file input. Can you post the first 10 lines or so of your XML?
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

YEs Vijay I have imported my fileds using XML Metadata Importer only. While doing so I checked the text of the columns(LAst node of the tree).

Following is how i configured my XML INPUT Plugin

In XML Imput Stage:

IN STAGE TAB
GENERAL: Nothing has been checked.
TRANSFORMATION SETTINGS: CHECKED "REPITITION ELEMENT REQUIRED". CHECKED "INCLUDE NAMESPACE DECLARATION" and loaded information from table definitions.

IN INPUT TAB
XML SOURCE: selected on of the two columns in folder stage.
COLUMN CONTENT: "URL/FILE PATH"

IN OUTPUT TAB
GENERAL: Nothing has been checked
TRANSFORMATION SETTINGS: CHECKED"INHERIT STAGE PROPERTIES"
ADVANCED: NOTHING HAS BEEN CHECKED
COLUMNS: IMPORTED COLUMNS FROM TABLE DEFINITIONS

Thanks,
rajesh
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

Hi! Arnd
How should we configure the xml stage,if we use a sequential file instead of a folder stage.
assuming xml goes like this...

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <messageListFromWcs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WcsToHost.xsd">
<datetime>2006-01-18T14:40:34</datetime>
<sequenceNo>00000598</sequenceNo>
- <purchaseOrdersToBW>
<extractDate>2006-01-18</extractDate>
<poNum>638508</poNum>
<poSplitNum>02</poSplitNum>
<sapDcSiteCode>D985</sapDcSiteCode>
<supplier>500362</supplier>
<orderDate>2006-01-18</orderDate> .......

Thanks
kalpna
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

hi! Raj
I have similar problem with my job..
please!, let me know if you solve it.
but,in INPUT tab, i am using COLUMN CONTENT as XML Document

Thanks
Kalpna
Post Reply