Truncation of Decimal Values

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
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Truncation of Decimal Values

Post by mac4rfree85 »

Hi Guys,

I am receiving data in Flat file. I am reading it as a Varchar and loading it to Oracle Table (Double datatype). It is loading properly (1344.324).

In an another job, when i am reading it using Oracle Connector stage (Double Datatype), i am able to see the data is coming properly as 1344.324 in View Data.
After the Oracle stage, i have a transformer stage(Double Datatype). I am routing the data to Peek Stage (Double Datatype), i am seeing the data has been truncated to 1344.32
The target table is also loaded with incorrect data 1344.32.

This is happening only with values having more than 2 decimal values.

Can somebody point me out where i am doing something wrong.

Thanks for your help in advance.

Cheers!!!!
Mac4rfree
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Often this is just a display issue, not an actual truncation. You can put an output link on your peek to a flat file and see if the value is also truncated in the flat file.
Also, what did you specify for the length and scale of the double datatype and is it different in the peek stage?
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

Even in the Flat file, i am getting the value truncated.

I have given length as 22 and scale as 10 (same as Database)

Please let me know if i am missing out something. Is there any environmental variables which may restrict the decimal values?
Mac4rfree
harishkumar.upadrasta
Participant
Posts: 18
Joined: Tue Dec 25, 2012 10:39 pm
Location: Detroit,MI

Post by harishkumar.upadrasta »

Hi,

Please refer the below link for Datastage and Oracle Datatype considerations.


http://publib.boulder.ibm.com/infocente ... types.html

Please try using Decimal(22,10) in your transformer and let us know if this fixes your issue.
Harish
Post Reply