Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
McJingles
Contributor III
Contributor III

Catch all type of errors

How to catch all types of errors in Talend.?

 

Is there any examples of generating an error and catch those errors.

Please let me know how to do that.

 

Thanks in Advance..!!

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

If these error occurs on DB components, and you want to catch them, check the 'Die on error' box, these SQL error will be thrown out and can be captured by tLogCatcher.

View solution in original post

11 Replies
Anonymous
Not applicable

Hi
You can use tLogCatcher to catch the Java error, customize error thrown by tDie component. To generate an example error for testing, use tFileInputDelimited to read the a file that does not exist, it will thrown FileNotFound Java exception.

Regards
Shong
McJingles
Contributor III
Contributor III
Author

Thanks @shong 

 

But, I can catch Java exception error and SQL query error by using tLogCatcher alone.

How can I catch the errors like Data truncation and Type mismatch: int to string errors.?


Capture.JPG
Anonymous
Not applicable

If these error occurs on DB components, and you want to catch them, check the 'Die on error' box, these SQL error will be thrown out and can be captured by tLogCatcher.
McJingles
Contributor III
Contributor III
Author

Thanks @shong 

 

And one more is how can I catch the mismatch type error like int to string which occurs in the tMap component.?

Anonymous
Not applicable

The mismatch type error is Java exception error, make sure the 'die on error' box is checked on tMap.

McJingles
Contributor III
Contributor III
Author

There is no such option in the tMap component, @shong 

 

 

Anonymous
Not applicable

Hello,

Please see the setting screenshot.

0683p000009M8MM.png

Best regards

Shong

 

tnewbie
Creator II
Creator II

Hello Shong,

Enabling 'Die on Error' would fail the job, is there where the job would still move on and enable us to capture the errors.

Example:

I have Million records in my source table, 999999th record has a data value that will be truncated, if I enable 'Die on Error' this error will be captured but my job would fail, is there a way where i would still continue and be able to capture the error?

 

Thanks

 

Anonymous
Not applicable

@tnewbie, it is possible capture the error and continue to process next record, you need to iterate the records one by one, but the performance is bad if the data volume is big.