Reading XML file.

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
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Reading XML file.

Post by Siddharth3012 »

Hi Friends,

I am new to DSxchange and Datastage both. I have a requirement to read XML file and post into oracle RDBMS tables. I am using DS 7.x Enterprise edition....the thing is that when i searched the DS pallete, I could not find any stage to read XML format file. Can you please help me to read the XML file reading and validation. Please provide the answer step wise..so that i could go fwd step wise to implement....
Thanks in adavnce..bi
Siddharth Pratap Singh
Datastage Developer
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Welcome. :D

So seriously, you couldn't find any of the XML stages in your palette? You have to have a job open in the Designer (other than a Sequence job) to see the appropriate icons for the job type, but unless yours has been customized they all should be there under the Real Time category:

XML Input: for reading
XML Output: for writing
XML Transformer: for... 'transforming', typically via XSLT

Suggest you find and read the XMLPACK_20_Designer.pdf document in the Docs directory on your PC. That and get the XML Best Practices document from the Tips page on Kim Duke's website. Both will go a long ways towards getting you going in XML with DataStage.

And lastly you'll find the Folder stage is used to feed the XML Input stage in Server jobs while the Sequential File stage is used in PX jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

How to read XML file in Sequential file stage

Post by Siddharth3012 »

Hi,

First thing first...Thank you very much for your help and support...
Next thing ...you have mentioned that Sequential File stage is used to feed the XML input stage in PX. My question is How we are going to read the XML file in seq. stage...Do we need to set any properties in Seq stage to read XML file...

2. When we have XML input stage to read XML file..then Why we are taking seq file stage to feed XML input stage...wat is the basis of that?

Thanks in advance!

chulett wrote:Welcome. :D

So seriously, you couldn't find any of the XML stages in your palette? You have to have a job open in the Designer (other than a Sequence job) to see the appropriate icons for the job type, but unless yours has been customized they all should be there under the Real Time category:

XML Input: for reading
XML Output: for writing
XML Transformer: for... 'transforming', typically via XSLT

Suggest you find and read the XMLPACK_20_Designer.pdf document in the Docs directory on your PC. That and get the XML Best Practices document from the Tips page on Kim Duke's website. Both will go a long ways towards getting you going in XML with DataStage.

And lastly you'll find the Folder stage is used to feed the XML Input stage in Server jobs while the Sequential File stage is used in PX jobs.
Siddharth Pratap Singh
Datastage Developer
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Post by Siddharth3012 »

chulett wrote:Welcome. :D

So seriously, you couldn't find any of the XML stages in your palette? You have to have a job open in the Designer (other than a Sequence job) to see the appropriate icons for the job type, but unless yours has been customized they all should be there under the Real Time category:

XML Input: for reading
XML Output: for writing
XML Transformer: for... 'transforming', typically via XSLT

Suggest you find and read the XMLPACK_20_Designer.pdf document in the Docs directory on your PC. That and get the XML Best Practices document from the Tips page on Kim Duke's website. Both will go a long ways towards getting you going in XML with DataStage.

And lastly you'll find the Folder stage is used to feed the XML Input stage in Server jobs while the Sequential File stage is used in PX jobs.
Siddharth Pratap Singh
Datastage Developer
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Post by Siddharth3012 »

chulett wrote:Welcome. :D

So seriously, you couldn't find any of the XML stages in your palette? You have to have a job open in the Designer (other than a Sequence job) to see the appropriate icons for the job type, but unless yours has been customized they all should be there under the Real Time category:

XML Input: for reading
XML Output: for writing
XML Transformer: for... 'transforming', typically via XSLT

Suggest you find and read the XMLPACK_20_Designer.pdf document in the Docs directory on your PC. That and get the XML Best Practices document from the Tips page on Kim Duke's website. Both will go a long ways towards getting you going in XML with DataStage.

And lastly you'll find the Folder stage is used to feed the XML Input stage in Server jobs while the Sequential File stage is used in PX jobs.
Siddharth Pratap Singh
Datastage Developer
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The XML Input stage needs an input link. Since there is no PX folder stage, the Sequential File stage will have to take its place and luckily it supports wildcard pattern matching so it can 'read' multiple files much like the folder stage. It can also be set to capture and pass just the filename, which is all the XML Input stage needs when the XML Source is set to URL/filepath.

:idea: When you end up with multiple posts, you can delete the 'last' one as long as it is truly last, meaning there are no replies to it yet. So, you could have worked your way up from the bottom and deleted the two 'extra' posts. Do this by selecting the 'Edit/delete this post' and then checking the 'Delete this post' before clicking on Submit.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Metadata in Seq file stage

Post by Siddharth3012 »

Hi Craig,

U mean that we are going to set the seq file stage just to capture and pass the filename to XML input stage. If we configure the seq files stage to pass the filename only...then wat about the load of metadata...do we need load the metadata in Seq stage...if not then how we are gng to connect to XML input stage....Also we need to set the properties of data pattern in seq file stage whether its an CSV file, fixed format like that..otherwise without metadata and file format...how seq file satge wud read the file...

Thanks!

Siddharth



chulett wrote:The XML Input stage needs an input link. Since there is no PX folder stage, the Sequential File stage will have to take its place and luckily it supports wildcard pattern matching so it can 'read' multiple files much like the folder stage. It can also be set to capture and pass just the filename, which is all the XML Input stage needs when the XML Source is set to URL/filepath.

:idea: When you end up with multiple posts, you can delete the 'last' one as long as it is truly last, meaning there are no replies to it yet. So, you could have worked your way up from the bottom and deleted the two 'extra' posts. Do this by selecting the 'Edit/delete this post' and then checking the 'Delete this post' before clicking on Submit.
Siddharth Pratap Singh
Datastage Developer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Standards Note
U is a Burmese name (indeed, one of the posters here has that name), wat is a Buddhist temple, and wud isn't anything. Nor is gng. Please endeavour to use a professional standard of English on DSXchange. It makes things easier for those whose first language is not English.


Metadata is managed by importing or parsing, separately from job design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Post by Siddharth3012 »

i will take care of this in future.....
bi


ray.wurlod wrote:Standards Note
U is a Burmese name (indeed, one of the posters here has that name), wat is a Buddhist temple, and wud isn't anything. Nor is gng. Please endeavour to use a professional standard of English on DSXchange. It makes things easier for those whose first language is not English.


Metadata is managed by importing or parsing, separately from job design.
Siddharth Pratap Singh
Datastage Developer
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

On the source for an EE xml job, I've found that passing in the url for filenames is the simplest way to go.....then you aren't dealing with variable length file sizes and size limits for single columns, etc. Use the External Source stage if this is EE, with an "ls" as the source command. I have the full syntax that I use at http://dsrealtime.wordpress.com/2007/12 ... -a-source/

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Thanks for posting that, Ernie. Bookmarked your blog. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Siddharth3012
Participant
Posts: 10
Joined: Sat Dec 22, 2007 12:09 am
Location: Gurgaon

Hey

Post by Siddharth3012 »

Hey,

I tried to read the XML file with sequential file stage but its giving some proble. I have set the XML input stage properly to read the XML file.
Can you please help me to set the Sequential file stage for XML file reading. By setting i mean, can you please provide the properties/attributies that are needed to set before i could read the XML file in sequential stage in PX.
Thanks in advance!

Siddharth
chulett wrote:Thanks for posting that, Ernie. Bookmarked your blog. :wink:
Siddharth Pratap Singh
Datastage Developer
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Hey

Post by chulett »

Hey,

Why not give Ernie's method a shot? Sounds way more better. And learn to post without nonsensically quoting the previous post for no dang reason. :?
-craig

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