Decimal Places getting truncated while moving data

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

kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Decimal Places getting truncated while moving data

Post by kagnihotri »

Hi I am new to data stage and i am also facing the issue.
We are using datastage runtime column prapogation for a table. The source value is 11111111111.489001 and in target getting 11111111111.489.
Decimal Places getting truncated while moving data
Could anybody pls help?

thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Thanks for starting a new post, that's what you needed to do rather than find an old 'similar' post to add your question to. And rather than doing both. :wink:

ps. I deleted your 'extra' copy of this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So your source and target are tables? What database and what are the datatypes of the actual source and target database fields?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

Thanks Craig...The source and target tables are oracle tables. Oracle Version is 11.1.0.7. The column data type is number in source and target.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

An unbound number with no precision like NUMBER rather than NUMBER(15)? Both sides?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

Yets its NUMBER only.
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
Then how are you getting decimal in target?
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

Oracle NUMBER datatype can store a decimal number. The source is NUMBER datatype and target is also NUMBER datatype.

The source value is 11111111111.489001 and in target i am getting 11111111111.489. I am using runtime column prapogation.

Please let me know if I misunderstood your qestion or if you need more details. Thanks in advance.
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

Hi Craig,

yes its NUMBER only...NO precision on both sides.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

My understanding is an unbound Oracle NUMBER is stored in floating point. Still, not sure why that value would be truncated during RCP - perhaps there is an APT variable that needs to be set? Or perhaps a patch.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

HI Craig, I checked and found that the issue is with the precision. When I increased the precision of source number to more then 15 digits, the target number is getting round off. Could you please help?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How have you set the SCALE ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kagnihotri
Participant
Posts: 10
Joined: Sat Feb 16, 2013 9:45 am

Post by kagnihotri »

I havent set any scale or precision... But what i found is that even if the source number is having more than 15 digits before decimal and any number of digit after decimal, the target is having total of 15 digits(with or without precison,,

Could you please let me know how to set scale or precision if runtime column prapogation.?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, 15 is a magic number and (from what I recall) the default precision limit under the covers in DataStage. Problem is I don't recall and couldn't find via a search how to change that... guys, is there an APT variable for that? In uvconfig? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
eph
Premium Member
Premium Member
Posts: 110
Joined: Mon Oct 18, 2010 10:25 am

Post by eph »

Hi,

You could try APT_DECIMAL_INTERM_PRECISION and APT_DECIMAL_INTERM_SCALE to set at project level those properties.

Eric
Post Reply