Page 1 of 1

xml input stage

Posted: Fri Aug 25, 2006 8:27 am
by Indra
Hi

I have converted a dsjob and exported as Xml doc.Iam trying to write coulmn details, key,sql type in separate seq file.
How to get data from XML I/P to Oracle or seq File.
I have used
folder--> Xml I/P--> Seq file.

In Xml input stage, in i/p i have given FileName & record.In O/p i have loaded columns that i have imported using Xml metadata importer and mapped to Seq.file.

Can anyone help me out..

Thanks

Re: xml input stage

Posted: Fri Aug 25, 2006 8:59 am
by NBALA
This seems the same issue (may be duplicate post ?! ) like one

http://www.dsxchange.com/viewtopic.php?t=103093

Please use this to answer.

The XML Meta Data Tool scans XML documents and creates DataStage table definitions from them.

The tool has its own documentation (XML Developer's Guide) and dedicated online help file. Consult these for more details about its operation.


-NB

Posted: Fri Aug 25, 2006 9:19 am
by Indra
Thanks.

I have used Xml metadata importer for creating so..

The Pbm is that in Xml i/o stage , in o/p i have loaded the necessary columns & specified Xpath exp.Is that ri8 s

But still iam not able to get any o/p.

Posted: Fri Aug 25, 2006 9:26 am
by uegodawa
Use the following stages.

Folder ---> XML Input ---> Transformer ----> SEQ file.
Whatever columns comes out from XMLInput should pass-through the Transformer stage. In the transformer you might have to convert some invisible characters as follows.
ereplace(ereplace(xmlOP.Column1, char(10) , ""),char(9) , "")
try that way, you would be able to see values in the SEQ file.
- U

Posted: Fri Aug 25, 2006 9:57 am
by NBALA
[quote="uegodawa"]First use the DataStage Manager to Load the meta data.
Manager -> Import - > Table def - > XML TAble DEf
Then Open your XML . File -> Open
Then click on all text nodes which you want and save the meta data.
Now goback to your job, open XML Input stage, then output tab , columns, Load.
Then Load the meta data which you saved earlier.
- U
[/quote]
(This quote from the duplicate Post)

Posted: Mon Aug 28, 2006 1:07 am
by Indra
Thanks.

I have used all the necessary steps.

But now in Folder stage it reads all the txt files but not the xml doc that is in the folder.

Is there any changes to do...

Posted: Mon Aug 28, 2006 3:30 am
by ray.wurlod
Yes. Stop trying to process metadata with a data processing tool.

Posted: Mon Aug 28, 2006 5:42 am
by Indra
Thanks Ray.

But still no records now passes from source to target........

Posted: Mon Aug 28, 2006 9:40 am
by uegodawa
Can you please double check the properties of your Folder Stage;

Stage->Properties->Folder PathName : Defined the folder where you could find the xml. e.g C:\MyFiles\XML

Outputs->Properties->WildCard : Mention your xml document.
e.g MyFile.xml

In the XML Input Stage->Input -> XML Source Column : Select the second column which is related to XML data ( Where First Coulmn is File Name).

Then you would be able to see the results.
- U

Posted: Tue Aug 29, 2006 12:30 am
by Indra
Thanx

Posted: Tue Aug 29, 2006 1:10 am
by ray.wurlod
Please share your solution so that future searchers will need less time to get to it.