[resolved] How to convert float to integer in tMap ?

Highlighted
One Star

[resolved] How to convert float to integer in tMap ?

Hello
How to convert float (AS400) column to integer (Postgres) column in tMap ?
I tried several methods without success :-(
Thanks

Accepted Solutions
Highlighted
Seventeen Stars

Re: [resolved] How to convert float to integer in tMap ?

hi,
have a look at :
 http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
It give you the method in java 
ps : you can also do something like 'java String to integer' in google Smiley Wink  or look for similar post in Talend forum with the option Search ....
regards
laurent

View solution in original post


All Replies
Highlighted
Community Manager

Re: [resolved] How to convert float to integer in tMap ?

Hello
try
(int)row1.columnName

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Highlighted
One Star

Re: [resolved] How to convert float to integer in tMap ?

thanks a lot Shong, it works !
I don't understand why i haven't try this before...
Two Stars

Re: [resolved] How to convert float to integer in tMap ?

how to convert string 0.15 into integer?
thanks and regards
Syed
Highlighted
Six Stars

Re: [resolved] How to convert float to integer in tMap ?

Integer.parseInt(yourstring);
Highlighted
Seventeen Stars

Re: [resolved] How to convert float to integer in tMap ?

hi,
have a look at :
 http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
It give you the method in java 
ps : you can also do something like 'java String to integer' in google Smiley Wink  or look for similar post in Talend forum with the option Search ....
regards
laurent

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog