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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Putting error email notification

hi there,

 

I'm new to Talend Open Studio version 7.  We have an old ETL jobs that was running in the older version.  I have a project to enhaceme these ETL jobs on this newer version.  Currently, our jobs was to load from multiple schema and to multiple tables.  One on my plans is to put some error notification.  So below, I have a job that loops multiple schemas by checking which clients are active.  It passes and loops the schema values on my 3 child jobs and these child jobs loads 25-30 from schema to datamart.  Can you please help me how can I put my email notification.  It seems that on my tJava, it wasn't able to read the error?

 

on my tJava:

globalMap.put("errorCode", tLogCatcher_1.message);

 

 

Labels (3)
1 Reply
Anonymous
Not applicable
Author

@mj_00 Please follow below steps. i have a simple job loading from list of files to a database, for this i used code from outline and wrote in the message box of Email component

 

Code in the message for my simple job i used is here

 

"Job name : " + jobName
+ "\n" +
"File processed : " + StringHandling.LEFT(((String)globalMap.get("tFileList_2_CURRENT_FILE")),StringHandling.INDEX(((String)globalMap.get("tFileList_2_CURRENT_FILE")),".")) + ".zip"
+ "\n" +
"Number of records in file : " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE"))
+ "\n" +
"Number of records successfully loaded : " + ((Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED"))
+ "\n" +
"Number of records failed initial validation : " + (Integer)globalMap.get("counterValidationError")
+ "\n" +
"Number of records failed due to other technical reasons : " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE") - (Integer)globalMap.get("counterValidationError") - (Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED"))
+ "\n" +
" Error file generated at : " + context.ZebuErrorDirectory +StringHandling.LEFT(((String)globalMap.get("tFileList_2_CURRENT_FILE")),StringHandling.INDEX(((String)globalMap.get("tFileList_2_CURRENT_FILE")),".")) + "-" + TalendDate.formatDate("yyyyMMddHHmmssSSS",(Date)globalMap.get("loadDate")) + ".txt"

 

You can find this code for components in the outline at left side bottom in studio

 

Let me know if you have any further questions, by doing this we can get an email error notification with clear message, use all the components where the transactions were performed

 

0683p000009M3Sp.png0683p000009M3Sz.png