How to use XML file as a source file
Moderators: chulett, rschirm, roy
How to use XML file as a source file
Hi,
In my job XML file is used as a source. I want to know how to get the data from this XML file and load it to target table or csv file format.
Could you pls help me out...
Thanks in Advance...
Aswice
In my job XML file is used as a source. I want to know how to get the data from this XML file and load it to target table or csv file format.
Could you pls help me out...
Thanks in Advance...
Aswice
Last edited by Gopalraja on Wed Apr 15, 2009 11:50 pm, edited 1 time in total.
How to use XML file as a source file
Hi,
Anybody know how to use the XML file as a source...
Aswice
Anybody know how to use the XML file as a source...
Aswice
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
Hi,
There are a number of ways, depending upon your requirements, although the easiest will almost certainly be to use the XML Input stage. <a href="search.php">Search</a> for it on dsxchange.
You can also read Ernie's excellent blog entry on the topic: http://dsrealtime.wordpress.com/2007/12 ... -a-source/
An alternative I have also used (for a variety of reasons) is to use an External Source stage and flatten the XML using an externally-defined XSL stylesheet. I'd stick with the XML Input stage.
John.
There are a number of ways, depending upon your requirements, although the easiest will almost certainly be to use the XML Input stage. <a href="search.php">Search</a> for it on dsxchange.
You can also read Ernie's excellent blog entry on the topic: http://dsrealtime.wordpress.com/2007/12 ... -a-source/
An alternative I have also used (for a variety of reasons) is to use an External Source stage and flatten the XML using an externally-defined XSL stylesheet. I'd stick with the XML Input stage.
John.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Re: How to use XML file as a source file
Yes, of course. However, you need to learn patience - you bumped your post again after what - 30 minutes? Give me a break. You're lucky John was able to respond as quickly as he did, don't come to expect it though.Gopalraja wrote:Anybody know how to use the XML file as a source...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: How to use XML file as a source file
As said by jhmckeever you need to look for the 'XML input' stage in DS8.0.Gopalraja wrote:Hi,
In my job XML file is used as a source. I want to know how to get the data from this XML file and load it to target table or csv file format.
Could you pls help me out...
Thanks in Advance...
Aswice
Import the table definition for respective xml file.
your parallel job will atleast have the following stages,
row generator-->xfm1-->xml input-->xfm2-->sequential fle
In xfm1 give the path of your xml file in derivation of the column that will be mapped from row generator stage.
In the xml input stg under input pg>xml source>column content select URL/file path.
Load the table definition in the output pg which was imported in the begining.
In the sequential file stg, set the field delimiter as 'comma' to get the o/p in csv format
Kindly let me know if i missed out anything
cheers!!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Please strive for a professional standard of written English here on DSXchange; it makes life easier for those whose first language is not English, and shows respect for other posters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
can u tell me how to use
Rowgenerator--> Transaformer stage here
bcz i have developed the job like
seqfile-->xml input --> oraclestage
now i am facing one problem like if i got a file with above 7kb then job get aborted so i am looking other solution .
if my understanding is correct for your design is
Rowgenerator -->for dummy purpose
Transaformer -->you are passing path info
let me try whether it will solve my issue.
everyone said we have to use External source stage but my server is in windows so i am facing some issue in that stage. i believe we need to install 7.5x.2 ESS patch in my server mechine for ESS.
Rowgenerator--> Transaformer stage here
bcz i have developed the job like
seqfile-->xml input --> oraclestage
now i am facing one problem like if i got a file with above 7kb then job get aborted so i am looking other solution .
if my understanding is correct for your design is
Rowgenerator -->for dummy purpose
Transaformer -->you are passing path info
let me try whether it will solve my issue.
everyone said we have to use External source stage but my server is in windows so i am facing some issue in that stage. i believe we need to install 7.5x.2 ESS patch in my server mechine for ESS.