问题
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