DECIMAL TO DECIMAL CONVERSION REDUCTION IN SIZE

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
npraveen
Participant
Posts: 3
Joined: Tue Sep 28, 2004 3:00 am
Location: Chennai

DECIMAL TO DECIMAL CONVERSION REDUCTION IN SIZE

Post by npraveen »

My incoming datatype is Decimal (38,10) which has to be mapped to Decimal (18,0) field. The incoming data will never have decimals. How do I got about reducing the size. The target database is teradata.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try performing simple arithmetic (adding zero is good) in a Transformer stage. DataStage should look after the metadata transition across the Transformer stage.
Beware, however, that any source number with more than eighteen significant digits will fail to load into the target.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
alisoviejo
Participant
Posts: 49
Joined: Fri Nov 11, 2005 10:19 am

Post by alisoviejo »

Hi Ray,

I guess, when we are reading decimal values from teradata, the 0s are truncated
ex 1.5 instead of 1.50

Is there any way we can preserve the 0s.
ALISO
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Open the row (Edit Row in the Columns grid) and set the Decimal Type sub-property. Click on Help to learn more about what this does. Beware that the data browser (View Data) may add leading zeroes to the display of decimal fields whether or not they are actually there in the data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply