writing to XML file

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

writing to XML file

Post by vij »

Hi all,

I have a job which is like this:
source dataset ---> transformer stage ---> target XML file
The dataset has about 100,000 records and writing in to XML file is very slow. If i replace the XML file / sequential file, it would be faster. I would want to know is there any thing I miss when I am writing to XML or DataStage is slow writing to XML file?

Thanks in advance!
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

You need an XML Output Stage to write out the XML to your target file.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

I am also using the same.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Quantify "very slow" and "faster" without using rows/sec which, as I have established elsewhere, is an essentially meaningless metric. What volume of characters is written into a text file versus what volume of characters is written into the XML file? How much extra processing is needed to create the XML tags?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

For 146900 records, it takes 9 minutes and theres no logic involded in the transformerstage, it just converts the decimal column values to string. Transformer stage was here because, in the generated XML file the decimal column values are not appearing, if the datatype is decimal.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... and in the case of sequential file output, preserving the same transformations so that the test is fair?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

yes, it took just a minute! so, i have about 8 minutes difference, for the same number of records.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Apples and Oranges. The XML parsing is Java under the covers (Xerces based, IIRC) and not all that speedy. Be happy with your 9 minutes, there is plenty of 'logic' involved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post by pavankvk »

xmlout stage is sequential by default. try enabling parallel mode. but it may screwup up ur xml generation logic based on some keys. give a try.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Craig is right. Be happy. XML is going to be inherently slower than anything else, especially pure sequential stage functionality.
Post Reply