Hi All,
I have XML file, so I need to read whole XML file as a string and map to one output column in DataStage. I have tried no. ways, but no luck. Please help on this.
Thanks,
Venkata
How to read whole XML file as a string and in DataStage.
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 22
- Joined: Wed May 08, 2013 8:38 am
- Contact:
How to read whole XML file as a string and in DataStage.
Thanks,
Venkata Gundavarapu
Venkata Gundavarapu
Have you tried using the XML stage?
Here is an article link.
http://www.ibm.com/developerworks/data/ ... index.html
Here is an article link.
http://www.ibm.com/developerworks/data/ ... index.html
Choose a job you love, and you will never have to work a day in your life. - Confucius
-
- Premium Member
- Posts: 22
- Joined: Wed May 08, 2013 8:38 am
- Contact:
How to read whole XML file as a string and in DataStage.
Thank you for your quick reply.
I am using XML stage currently.
I have read that online document, but they didn't mentioned exactly how to read whole XML file and map to one column.
They only talked about retrieving two flat files and composed as XML file and load into DB2 table.
In my case, I have XML file as source and need to load whole XML file into DB2 Column as XML type or STRING.
Thanks,
Venkata
I am using XML stage currently.
I have read that online document, but they didn't mentioned exactly how to read whole XML file and map to one column.
They only talked about retrieving two flat files and composed as XML file and load into DB2 table.
In my case, I have XML file as source and need to load whole XML file into DB2 Column as XML type or STRING.
Thanks,
Venkata
Thanks,
Venkata Gundavarapu
Venkata Gundavarapu
-
- Premium Member
- Posts: 22
- Joined: Wed May 08, 2013 8:38 am
- Contact:
How to read whole XML file as a string and in DataStage.
Hi Craig,
It's OK for me.
I have read online documents since morning as you mentioned, but I didn't find the correct solution so far.
I need to one thing is how to read whole XML file as String.
Thanks,
Venkata
It's OK for me.
I have read online documents since morning as you mentioned, but I didn't find the correct solution so far.
I need to one thing is how to read whole XML file as String.
Thanks,
Venkata
Thanks,
Venkata Gundavarapu
Venkata Gundavarapu
If you are just reading it all as one big string, and it's in a disk file, then use a Server Job, with a Folder Stage...that will pick up "the whole file" within a single column......push it wherever you want to. No sense parsing the xml if you don't have to.
When you drop the Folder Stage and create an output link, load the built-in table definition onto it (it's in the Table Defs/Built-in category). Your contents will go into the column called "Record".
The Connectors were updated awhile back for xml types of columns, but do some careful testing independently before you include the xml.
Ernie
When you drop the Folder Stage and create an output link, load the built-in table definition onto it (it's in the Table Defs/Built-in category). Your contents will go into the column called "Record".
The Connectors were updated awhile back for xml types of columns, but do some careful testing independently before you include the xml.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>