Check the logs and abort the jobs on the basis of the count received

谁说我不能喝 提交于 2019-12-13 05:16:34

问题


For my code , I have 5 logs generated for 5 different tables . I have to find for which table the records are not loaded correctly .

Logs generated
NWPR_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors. NWPX_TempLoad_CSP_11.log: 326 Rows not loaded due to data errors. PRAD_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors. PRER_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors. PROV_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors. PRSQ_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors. PRWM_TempLoad_CSP_11.log: 0 Rows not loaded due to data errors.

Here we can see that for NWPX 326 were not loaded due to data errors . so I want the job to abort and in the error message we neeed to print , job aborted for NWPX load


回答1:


One option is to define a reject link from the Connector with which you write the target table. With a reject link you can specify to abort the job if number of rows on that reject link is >= 1

The job log should have the information about the rejected record anyways.

For more details the stages and exact requirements should be described in more detail.



来源:https://stackoverflow.com/questions/52533969/check-the-logs-and-abort-the-jobs-on-the-basis-of-the-count-received

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!