Five Stars

Execute stored proc when two separate subjobs succeed

I'm new to Talend.

I am replicating two database tables from the source to two local staging tables. Each process is in its own independent subjob and multi-thread is turned on.

When both subjobs complete successfully, I want to execute a stored procedure, but don't know how to determine that both subjobs completed successfully.

I've tried on subjob ok, linked to the proc connector, but only one subjob will link.

I've tried on subjob complete, but the proc will execute when only one subjob completes.

I looked into the tPostJob connector, but it sounds like it will execute even if one or both subjobs fail.

Any thoughts?



Re: Execute stored proc when two separate subjobs succeed


You need for this use case two jobs. The parent job is your mentioned jobs for the start and the second job contains the two subjobs.

Parent job:tRunJob-->onsubjobok-->stored procedure

Child job: subjob1


Let us know if it is OK with you.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.