Send mail when tStatCatcher/tLogCatcher is on error

Four Stars

Send mail when tStatCatcher/tLogCatcher is on error

Hello,

 

I have a job that uses tStatsCatcher and tLogCatcher components for monitoring. These components track errors well and send them to a database and email.

 

I would like to send an email (tSendMail) in case the sending of the error to the database (tOracleOutput) does not work, ie if the connection to the database has failed. However, sending the mail does not work.

 

I tried to use several "main" on the tLogCatcher component but without success:

log_db_error.JPG

Also, I tried to put "OnComponentError" after "tOracleOutput", but it sends an email to each call of tStatCatcher.

 

Is it possible to catch this error?

 

Thank's !

Moderator

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello,

Please re-design your workflow like:

tStatCatcher--> tMap --> tOracleOutput
                           | onsubjob error
                           |
                    tSendMail

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello Sabrina,

 

I tried this solution but the component sends 2 mails, 1 at beginning and 1 at the end job.

Even when i add a condition for get only end stats in tMap (row3.message_type.equals("end")).

Moderator

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello,

How did you set the value in message body part of component tSendMail? Did you use any Context Value in it? Could you please post your current job setting screenshots on forum?

Note: Please mask your sensitive data.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

Definitive Guide to Data Quality

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

Download