Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in a Tmap : java.lang.NumberFormatException: For input string

Hi ,

 

While trying and loading the data in output database, i am getting below error:

 

Couldn't parse value for column 'CID' in 'row1', value is '"5"'. Details: java.lang.NumberFormatException: For input string: ""5""
Couldn't parse value for column 'CID' in 'row1', value is '"48"'. Details: java.lang.NumberFormatException: For input string: ""48""

PFA screenshots of tMap 

Please suggest the needful

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

The error "NumberFormatException: For input string:" usually occurs when Talend identifies inserting string value in the integer field. So make sure that if you are inserting the value form CSV file in to the field having data type as integer, it should not consist of string/character value or you can map the input column of CSV file to the field having data type as string.

Best regards

Sabrina

 

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hello,

The error "NumberFormatException: For input string:" usually occurs when Talend identifies inserting string value in the integer field. So make sure that if you are inserting the value form CSV file in to the field having data type as integer, it should not consist of string/character value or you can map the input column of CSV file to the field having data type as string.

Best regards

Sabrina

 

manodwhb
Champion II

@anurag13_,i suggest you to convert sting to integer,if required apply replaceall function for " with space.

 

 

Integer.parseInt(row1.col.replaceAll(""",""))

Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

<P>I found a step by step solution. Will share it in my next comment.

AGoowar1664450028
Contributor

It is important for me to communicate with interesting people. I am glad to be able to receive extra help for my studies. I started using. It helps me to be better.