Execution run of jobs into flatfile and send email

One Star

Execution run of jobs into flatfile and send email

Hello, 
I'm just wondering for help with the below scenarios.
Is there anyway to retrieve stl_load_errors table in redshift into talend job to capture errrors?
-- Copy Command to Redshift
copy wms_hkg_stg.consignee from 's3://xxx/xxx/xxx.csv.gz'
credentials 'aws_access_key_id=xxxxxxxxxxx;aws_secret_access_key=xxxxxxxxxxx' CSV delimiter '\t' IGNOREHEADER 1 ACCEPTINVCHARS ACCEPTANYDATE gzip;

while trying to insert some data after "?" there is null embedded value which fails to load in Redshift
Is there anyway to ignore null values within column having data & null values in same column.


Also I’m want to capture DB (redshift) error while running the job value into flat file and send email alert whenever data load error occurs. If there's talend component error we have components to capture. But if error happens within component like screenshot how to extract those
Regards,
Abdul.
Moderator

Re: Execution run of jobs into flatfile and send email

Hi,
We usually use tLogCatcher to capture the error message.
The work flow should be:
t<DB>input-->tfileoutputxxx
tLogCatcher--main--tJavaRow
   |
onsubjobok
   |
tSendMail
You can store the result to context variables or global variables first, and then get its value on tSendMail component.
Let us know if it is Ok with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.