One Star

Get the child job error code and error message in the father job

TOS verion : 2.3.2, r12707, java components
I have a child job that can finished in error with several tDie.
I want to catch the error in the father job and do specific treatment. For this treatment, I need the error code and the error message of the tDie in child job.
In father job, the tRunJob has "Die on child error" check. So my specific treatment is done on ComponentError link. But I have no way to get the child job error.
the only element I have is the globalMap.get("tRunJob_1_ERROR_MESSAGE") that is always "Child job running failed".
I don't think that it's possible to get the error code and the error message.
I think it's a good enhancement to return the error code and error message from the child job.
9 REPLIES
Community Manager

Re: Get the child job error code and error message in the father job

Hello laurie
We can use the tBufferOut component to store the error messsage in childjob, then return these message in father job.
(see the screenshot.)
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Get the child job error code and error message in the father job

So for you it's at me to manage the transmission of error from child to father.
Don't you think that it has to be native in Talend ???
For me, it's not my role to do that...
Community Manager

Re: Get the child job error code and error message in the father job

Hello laurie
Yes, I understand your point.Smiley HappyCurrently, we can only get the result return from the child job via this way.Smiley Happy
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Get the child job error code and error message in the father job

Hi,
I have a job in which the target table has the primary key set, when i try to duplicate it throws an database error without any failure of the job or componenet. I have to send an email with this exact error, I tried using tlogcatcher but i couldnt capture this error. Can anyone help me out in this
Community Manager

Re: Get the child job error code and error message in the father job

Hello
when i try to duplicate it throws an database error without any failure of the job or componenet. I have to send an email with this exact error, I tried using tlogcatcher but i couldnt capture this error. Can anyone help me out in this

If you don't want to stop the job even there is a db error, means the 'die on error' box is check, the tLogCature will not capture the error because the job don't throws the exception. In such case, you can link a reject flow from db output component, output the error records into a file and send the file to administrator.
B
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Get the child job error code and error message in the father job

Hi Shong,
Thank you for your reply. I tried with that option but i am able to send only the rejected records.But the requirement is i have to send the primary key violation error. The e-mail should have ORA-00001: unique constraint (PK_ID) violated.
One Star

Re: Get the child job error code and error message in the father job

sasikalae
In the reject row, there is two more fields errorCode and errorMessage. In errorMessage, there is the ORA error.
Hope this can help you

Re: Get the child job error code and error message in the father job

Hello Shong,
I am in a requirement of same scenario, What i could find an option was the below method, But error_code and error message is coming null, but i can see the ORA error in the run screen.
tfileinputdelimited ---> row(Main)---> toracleoutput
|
|
|------> row(Reject)---> tfileoutputdelimited
Thanks,
Vivek Jayapalan
One Star

Re: Get the child job error code and error message in the father job

Lame, I don't see a code value set anywhere or read anywhere.
Hello laurie
We can use the tBufferOut component to store the error messsage in childjob, then return these message in father job.
(see the screenshot.)
Best regards
shong