Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
@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