Int32 to Decimal conversion.

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
dsdevper
Premium Member
Premium Member
Posts: 86
Joined: Tue Aug 19, 2008 9:31 am

Int32 to Decimal conversion.

Post by dsdevper »

Hi ,

Source and Target both are Oracle.

My source column in defined as Number(3,0) and target is defined as Number(3,0). Even though they are same datatypes. I am getting following error.

"" When writing column INT32 into database column DECIMAL(3,0), truncation, loss of precision or data corruption can occur.; CC_DBSchemaRules; reportSizeMismatch; CC_DBSchemaRules.cpp; 1575) "".

I tried loading values hard coded as 1. Then also i am getting error.
I tried using AsDouble() and AsFloat().

But still same error.

Please any Help.

Thanks
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post by Sreedhar »

I assume that you have just like

Read Oracle -> Load Oracle.

Can you provide with your Job design.
That should help us give some Idea of what is going wrong.
Regards,
Shree
785-816-0728
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Int32 can have up to 10 digits. Decimal(3,0) may only have a maximum of three digits. Somewhere, something is representing data as Int32. You have to find it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsdevper
Premium Member
Premium Member
Posts: 86
Joined: Tue Aug 19, 2008 9:31 am

Post by dsdevper »

Sreedhar : My job design is Reading from Sybase database lookup with oracle table and load oracle table values to target oracle table.

oracle(Number(3,0))
|
|
Sybase --------Lookup---------Oracle(Number(3,0))

Ray : i even tried

1)creating a transformer in which i hard coded a value and defined as char. and before inserting i used string to decimal conversion.

2) i tried inserting the char field into Number(3,0) field.then also i am getting the same error.

""T_Table: ?? (IIS-CONN-DAAPI-000398; Schema reconciliation detected a size mismatch for column COLUMN1. When writing column INT32 into database column DECIMAL(3,0), truncation, loss of precision or data corruption can occur.; CC_DBSchemaRules; reportSizeMismatch; CC_DBSchemaRules.cpp; 1575) ""

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Re-read my response. DataStage is alerting you to the fact that some integers have more than three digits, so you may end up losing 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.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Did you try actually defining your column as decimal instead of numeric?
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply