Generate an xml file with column value in DB

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
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Generate an xml file with column value in DB

Post by DSRajesh »

Dear All,

I need to create an xml file with column value from Database table in the file name for example 001_test.xml,002_test.xml where 001 and 002 are fetching from table field name FID.

Looking farward for the suggestion how can i proceed for this.
RD
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Search around...there are some threads as recently as yesterday that talk about getting "row values" at run time into a filename that is written.....you'll find that the Folder Stage in a Server Job or the Sequential Stage in a 9.1 EE Job are two of the known ways to do this......not sure if either will meet your requirement, but those will be the techniques to search for.

Ultimately you would craft your xml and send the content down an output link using a single large column (something like "myXMLcontent" with longvarchar and a long length.....and if you are using the xmlOutput Stage, put a single "/" slash in the Description.

Use passthru to have FID also passed on the output link (same column on the input link and the output link).

Get that working so that you have the desired FID value and column on the same output link with your constructed XML.

...then send those two columns to one of the techniques that you test above.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply