xml input stage

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
Indra
Participant
Posts: 8
Joined: Fri Aug 25, 2006 7:58 am

xml input stage

Post 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
NBALA
Participant
Posts: 48
Joined: Tue Jul 11, 2006 11:52 am
Location: IL, USA

Re: xml input stage

Post 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
Indra
Participant
Posts: 8
Joined: Fri Aug 25, 2006 7:58 am

Post 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.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post 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
NBALA
Participant
Posts: 48
Joined: Tue Jul 11, 2006 11:52 am
Location: IL, USA

Post 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)
Indra
Participant
Posts: 8
Joined: Fri Aug 25, 2006 7:58 am

Post 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...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes. Stop trying to process metadata with a data processing tool.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Indra
Participant
Posts: 8
Joined: Fri Aug 25, 2006 7:58 am

Post by Indra »

Thanks Ray.

But still no records now passes from source to target........
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post 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
Indra
Participant
Posts: 8
Joined: Fri Aug 25, 2006 7:58 am

Post by Indra »

Thanx
Last edited by Indra on Wed Aug 30, 2006 12:24 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please share your solution so that future searchers will need less time to get to it.
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