Error on run shows - For input string: "599.75" (in red), but job complete without error on component

Four Stars

Error on run shows - For input string: "599.75" (in red), but job complete without error on component

I am making a job to read 60000 lines of excel and insert to mysql, job completes with some red error showing one of the field value in excel and 4 hundreds lines are missing in the DB. I set "Die on error" on both Excel read and MySqlInput component but it never die.

 

I am new to this tool and it would be grateful if I could get help on debugging such situation.

 

Thanks a lot.


Accepted Solutions
Highlighted
Four Stars

Re: Error on run shows - For input string: "599.75" (in red), but job complete without error on component

Finally I found in document that expression should be like this:

row1.Unit_Value==null?0:row1.Unit_Value.intValue()

My problem is solved!
Thank you!

All Replies
Six Stars

Re: Error on run shows - For input string: "599.75" (in red), but job complete without error on component

Can you provide your schema where you try to load these data.

This is probably a bad schema matching (lengh too long probably)

 

Do this :

 

1) Try to increase the lengh of the column in your output table schema.

OR

2) Truncate your value to fit the schema.

 

Four Stars

Re: Error on run shows - For input string: "599.75" (in red), but job complete without error on component

Hi AmanKino,

 

Thank you for your suggestion. Finally I find out there is a "Unit_Value" column that I want to convert it to integer, used row1.Unit_Value.intValue() then java throw out error when coming to a blank cell.

 

Would you teach me how to put a "if" condition so as to put integer 0 to blank cells or it contains a string?

 

I guess on the tMap corresponding output value:

if(!row1.Unit_Value.equals(null)){
     row1.Unit_Value.intValue();
}else{
     return 0;
}

 

But it comes to error...

 

Thanks a lot for your help.

 

Irvin

Highlighted
Four Stars

Re: Error on run shows - For input string: "599.75" (in red), but job complete without error on component

Finally I found in document that expression should be like this:

row1.Unit_Value==null?0:row1.Unit_Value.intValue()

My problem is solved!
Thank you!

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.