Page 1 of 1

Convert DB record to XML format.

Posted: Mon Feb 23, 2009 6:21 pm
by gxhpainter
Hi,

Want to read the DB table single record , convert into XML format layout and post the record in MQ Queue in one job.

Layout in the MQ Queue payload should look like below.
<emp>
<body>'john'
</body>
</emp>

How can I do it?
What are the stages the best used for the above?

Rgds,
Chakra

Posted: Mon Feb 23, 2009 8:37 pm
by eostic
You have some reading and searching to do...in this forum and in the documentation. Your format is fairly straightforward. Be sure to read about the single row and trigger functions of the XMLOutput Stage, and to unit test things before putting it all together. The MQ stages as a target are as much of a learning curve as is XMLOutput. Get things working to a sequential file before you try to do all of it. See also if you have a sample of the xml or an xsd so that you can import the metadata.

Ernie

Posted: Fri Feb 27, 2009 11:08 am
by gxhpainter
To Achieve the converstion.

1. Use ODBC Stage / DB Stge -> Transformation stage -> XML Input -> MQ Stage plugin
2. In XML Output stage, use '/' in the description.
3. Use Single row output.

We can send the message with XML format as payload in MQ Queue and structure will be retained in the payload.

Rgds,
Chakradhar.