Customize oracle type mappings

Hi, 
We have oracle 12 and all columns are defined as number. 
When we import the tables into the metadata of Talend, Number columns are imported as decimal by default. 
What we would like to do is to customize the mappings accordning to the precision. 
In other words, if the type is Decimal(10,0), we want it to be autmatically detected as Bigint. But if the type is Decimal(10,6), we want it to be imported as double. 
I tried editing mapping_Oracle.xml but then it started to map all Decimals to integer for whatever precision. 
	<talendType type="id_Integer">
<dbType type="INT" default="true"/>
<dbType type="INTEGER"/>
<dbType type="PLS_INTEGER"/>
<dbType type="NUMBER" defaultLength="20" defaultPrecision="0" ignoreLen="false" />
    <dbType type="NUMBER" defaultLength="1" defaultPrecision="0" ignoreLen="false" />
</talendType>


<talendType type="id_Double">
<dbType type="DOUBLE PRECISION" default="true"/>
<dbType type="BINARY_DOUBLE"/>
    <dbType type="NUMBER" defaultLength="10" defaultPrecision="6" ignoreLen="false" />
</talendType>
3 REPLIES
Moderator

Re: Customize oracle type mappings

Hi,
About the data type mapping between Talend type and db type, you can go to Windows-->Preference-->Talend-->Specific Settings-->Metadata of Talend Type and see mapping_DB.xml
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Customize oracle type mappings

Hello, 
Thanks for your reply. 
Actually the piece of the xml that I've attached is taken from mapping_oracle. 
But the problem is that I cannot change the mapping based on the precision of the decimal. I want talend map the Decimal(10,0) to bigint and Decimal(10,6) as double. 
One Star

Re: Customize oracle type mappings

Hi murat.migdisoglu,
Have you solved the problem? I want exact same thing for Exasol;
Decimal(18,0) as Integer
Decimal(9,0) as Smallint
Decimal(p,s) as Decimal --that means when the (p,s) are not (18,0) nor (9,0).
Best,
Tadej