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

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
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

All Replies
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
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

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

Integer.parseInt(yourstring);
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

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now