I've got into a weird issue while executing a job in Talend. Version I am using is:
Talend Open Studio for Data Integration 6.5.1
I was doing some error-handling, so I made a child job fail purposefully due to the error "Exception in component tPostgresqlOutput_3 (extract_material)
org.postgresql.util.PSQLException: ERROR: relation "rawstore.material" does not exist". Somehow, the exit_code is coming as 0 for it.
I've checked the properties of the component "tPostgresqlOutput". I've already checked the "Die on error" checkbox. The problem here is that, my parent job is unable to comprehend the failure of the child job and passing the control to the next job which should not happen ideally, the next job execution is dependent on "OnSubJobOk".
Attaching screen-shots below. Any help would be appreciated here.
Thanks in advance,
Are you using a tPostJob component? If so, that is the cause. You need to recognise you have received an error during your main job and force an error (using a tDie) in your tPostJob section.
If you are not using a tPostJob, you will need to give a bit more info about your job.
I am not using tPostJob component in the job. Also, I tried using tDie to handle the exit_codes and it works fine with it. The problem here is, I have around 20 jobs in total, and I'll have to apply tDie in all output components of all the jobs. This would make the jobs clumsy.
I'm attaching the screen-shot of the tPostgresqlOutput component that is failing. Let me know if you need any specific info.
If this is a bug, do I need to point this out to some specific group? How would this be rectified?
Any alternative solution to get this through(apart from applying tDie component in all jobs)? If not, should I move to some previous versions of Talend?
I actually have to productionize my code asap, hence, waiting for this to be resolved soon.
The things to try....
1) Reinstall your Studio. It *could* be an issue with your Studio install. I have tried using the tPostgresqlOutput and forcing an error (in that I do not have a db) and it always exits with 1.
2) Check out the Talend Jira to see if this issue exists (https://jira.talendforge.org)
3) Call support if you have a support contract
4) Try building the job in an older or newer version
5) Try compiling the job and see if it runs with the correct exit code once compiled
6) Use another method to raise the error (the tDie)