DS job : SQL server(XML code) to Seq. File
Posted: Wed Aug 18, 2010 11:46 pm
Hi,
I need to create a datastage job based on below requirement.
Source: SQL Server
Target: Sequential File
In Source there is a column with datatype XML, which holds the xml code in a single record as below:
e.g.
1st record:
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
</catalog>
2nd record:
<?xml version="1.0"?>
<catalog>
<book id="bk103">
<author>Gambardella</author>
<title>XML Guide</title>
</book>
<book id="bk104">
<author>Ralls</author>
<title>Midnight</title>
</book>
</catalog>
similarly we can have multiple records.
NOw the req. is to extract the above xml code from this source table and populate in sequential file as individual records.
"bk101","Gambardella, Matthew","XML Developer's Guide"
"bk102","Ralls, Kim""Midnight Rain"
"bk103","Gambardella","XML Guide"
"bk104","Ralls""Midnight"
New with this xml thing so please specify me exact steps to be done.
Thanks
I need to create a datastage job based on below requirement.
Source: SQL Server
Target: Sequential File
In Source there is a column with datatype XML, which holds the xml code in a single record as below:
e.g.
1st record:
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
</catalog>
2nd record:
<?xml version="1.0"?>
<catalog>
<book id="bk103">
<author>Gambardella</author>
<title>XML Guide</title>
</book>
<book id="bk104">
<author>Ralls</author>
<title>Midnight</title>
</book>
</catalog>
similarly we can have multiple records.
NOw the req. is to extract the above xml code from this source table and populate in sequential file as individual records.
"bk101","Gambardella, Matthew","XML Developer's Guide"
"bk102","Ralls, Kim""Midnight Rain"
"bk103","Gambardella","XML Guide"
"bk104","Ralls""Midnight"
New with this xml thing so please specify me exact steps to be done.
Thanks