Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSendMail on Error

Hi,
I am trying to connect Subjob Error on the database. I tried connecting the tSendMail to the database but the database does not Connect to the tSendMail on Subjob Error. In my example, I have simple table with a duplicate primary key to check if I get the email from Talend but I do not get any Error Email. How can I connect the database to the tSendMail Error? 

Labels (2)
10 Replies
Anonymous
Not applicable
Author

Hi,
How did you pass your error value into tsendmail component message body part? Did you use context value in it? Could you please show us your tsendmail component setting screenshot?
Best regards
Sabrina
Anonymous
Not applicable
Author

Sorry wrote on this post by mistake, did not mean to comment here.
Anonymous
Not applicable
Author

Thanks,

 

This is my sample table where ID is the primary key.



The database does not have subjob error connection available for the tsendmail.

 

Our company uses Outlook as our email and I have encapsulated the details in the screenshots.



As expected, the database threw out an error since the ID was repeated. How can I connect the database to the tSendMail so it emails me whenever an error occurs on the job.

Please provide assistance in this matter.

Thanks,
Anonymous
Not applicable
Author

Hi,
We usually use tLogCatcher to capture the error message. The work flow should be:
tfileinputxxx-->tMap-->tPostgresqloutput
tlogcatcher-->tsendmail
 
Or do you need to redirect the full stack trace on console output to email?
Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks,
I want Talend to send an email to me whenever the job fails or an error occurs. This is the same job from yesterday with the same, duplicate primary key. I have connected the components as you have kindly suggested but I do not get any email.



How can I connect the tLogCatcher to the postgreSQLoutput?



I have a simple message in my email component as you could apparently view that,
"Hello
An Error has occurred. Please have a take a look at it."
Please provide your kind advice!!!!!!!
Colleen
Anonymous
Not applicable
Author

Hi,
You cannot catch the error printed on console?
Usually, tLogCatcher component fetchs set fields and messages from Java Exception, tDie and/or tWarn. Have you already checked out "Die on error" option (It will stop job if there is any error )on tpostgreSQLoutput component?
Note:tlogcatcher cannot catch the full stack trace.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Colleen,

Have you tried connecting onComponentError from tpostgresqloutput component to tsendmail component ?(see attached screenshot) This way you may not have to use tLogCatcher as well although as Sabrina suggested it can catch Java exception, tDie and tWarn.

You dont have to connect tLogCatcher to postgresqloutput in case you use logcatcher.
Anonymous
Not applicable
Author

Thanks Fashah,

I have connected the components as you have suggested, but it does not send me an email when the job threw out an error.


We use Outlook mail here and below are my settings. Can you please help me tackle this issue.

Anonymous
Not applicable
Author

Hi,
The connection type"OnsubjobERROR" or "Oncomponenterror" is not triggered in your job.
Regardless the error message, are the 6 rows successfully loaded into your postgresql DB?
Best regards
Sabrina