Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change the data type of multiple columns with similar data type to a particular another data type?

Hi all

 

I am trying to load the data from Oracle to Greenplum database using Talend DI 7.0.1 version (tOracleInput -> tGreenplumOutput). I am getting error with the big decimal data type (DEC) while loading. If I convert type of the DEC to double using tConvertType, the data is getting loaded without errors. However I have hundreds of columns and I am finding it extremely difficult to look each and every column with DEC data type and change it to double in the target load.

 

Is there a way by which I can say Talend to Convert all the columns with dec data type to a desired target data type like double so that I don't need to go over each and every column. 

 

Thanks.

Labels (2)
3 Replies
Jesperrekuh
Specialist
Specialist

Suggestion, you allready tried:
- tOracleInput , There's a DBType (db) and a Type (java) which you could adjust in the input schema definition of the tOracle. This should work.
Or try...
- Did you place a tMap in between : OracleIn -> Java/tMap (convert) -> Greenplum , I thought this would map correct datatypes?!
Anonymous
Not applicable
Author

I am able to explicitly cast types in the input schema definition.. but that again requires me going to every column and changing it. I am not able to apply something universal.

 

I tried tMap, but that requires changing type of every column. I am a newbie to Talend, so not sure if there is any other way by which we could do this in tMap.

 

None of the in-built auto conversions work. The data load fails unless I fix the column data type to something that could be transferred.

Jesperrekuh
Specialist
Specialist

I you work with (save)defined Schemas you could look into your workspace / <project> / metadata ... files are stored ... never tried to scrip it so make sure you backup / copy ... look at .item files ... this is the only thing i can think of.