Warm tip: This article is reproduced from stackoverflow.com, please click
java talend

Talend studio isNumeric()

发布于 2020-05-05 11:12:58

I am learning talend open studio and I want to put this line of code :

boolean numeric = isNumeric(input_row.id);

In tjavaroW, but when I run the job it throws me an error:

isNumeric is an undefined method

. Please can you tell me how to solve this problem?

Thanks a lot.

Questioner
Thkas
Viewed
41
Aditya Rewari 2020-02-27 15:15

You can check.. if the input is numeric or not using below piece of code at tJavaRow

boolean isNumeric=true;
try{
    Integer i = Integer.parseInt(input_row.id);
} catch(Exception ex){
    isNumeric = false;
}