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

 

Highlighted
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

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!

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads