Page 1 of 1

importing metadata as decimal

Posted: Wed Feb 03, 2010 9:58 pm
by dnat
Hi

I have a col defined as Number in oracle. When i import it in datastage, the datatype is decimal for that column.

First i want to know why this is done. and also, should i just leave it as decimal and perform my operations or change it to integer in the metadata after i import and then do the transformations.

Posted: Wed Feb 03, 2010 11:29 pm
by ray.wurlod
It's done because Oracle is unusual - every other database has essentially compatible standards (SQL CAE Access Group standards). DataStage also complies with these standards, so has to translate where necessary.

Sometimes it doesn't get it right, but I blame Oracle for that. If you create a column in Oracle with INTEGER data type, it is actually created as NUMBER(38) even though the largest possible (32-bit) integer contains at most ten digits. When retrieved by DataStage, NUMBER(38) can not be interpreted as INTEGER without risk, so it's interpreted as DECIMAL(38,0). Which is wrong.