How to get console contents into tSendMail email message content?
Hi, as per title, I'd like to see what my console prints out in the email message content
My canvas image is attached
What do I need to put in the Message field in order to achieve this?
I've tried various selections from the ctrl spacebar dropdown list (without editing any of them) as per this page
https://help.talend.com/search/all?query=tSendMail For example, I have tried putting:
This design cannot work. If you get a reject flow no error messages will be put into the globalMap. The reject flow contains in two additional columns the message and the exception why this dataset is rejected. You should use these informations!
I would store the rejected datasets (including the additional errorMessage) into a file. In a new subjob I would check the counter tDBOutput_REJECTS and if it not null and greater than 0 I would send an email with the created file as attachment.
Hi
You can also consider to use a custom component called tRedirectOutput to redirect the entire message printed on the console to a text file, and send an email with the file if the job run fails, the job design looks like:
tMysqlInput--main--tMap--tMysqlOutput
|
onsubjoberror
|
tSendmail
About tRedirectOutput component, please read this topic:
http://www.talendforge.org/forum/viewtopic.php?pid=108078#p108078 Shong
Hi
The job is designed as below:
tPreJob--oncomponentOK--->tRedirectOutput
tMysqlInput--main--tMap--tMysqlOutput
|
onsubjoberror
|
tSendmail
Let me know if you have any questions.
Shong