How to don't stop job on onComponentError

One Star

How to don't stop job on onComponentError

Hi,
I have Job with loop, it connect to many database oracle.
I want if there are database connection Error to continue in next loop but job stop on first error even if i have "OnComponenentError".

How to do that.
In french :
Je voudrais que me job ne s'arrête pas même si il y a une erreur de connexion oracle car je gère les erreurs
Mais il s'arrête dès la première erreur.
Comment faire ?

cdt,
Arnaud
One Star

Re: How to don't stop job on onComponentError

Hi
The aim of database->tFlowToIterate_1 is to control times of loop, is it right?
You may use an Integer context and OnSubjobError to continue this loop.
But the workaround is not perfect.
Let's say there is a context.increment whose default value is 1.
Then we add a tJava between tFlowToIterate and tOracleConnection, set the code "context.intcrement++".
The attribute "Header" of tFileInputExcel is setted context.increment.
You may find more details as follows.
In addition, the trade version Talend Integration Suite will solve this issue perfectly by TAC.
Best regards!
Pedro
One Star

Re: How to don't stop job on onComponentError

Hi pedro
My problem is not on excel but on oracle connection. i run queries on more databases.
Many time some bases are down but i want job continue on next loop.
But my job stop after 1 error conection, i dont know how to force it to continue with the next loop.
cdt,
Arnaud
Highlighted
Six Stars

Re: How to don't stop job on onComponentError

Hi, you just need to place the loop to master job and connect the iterate connection to tRunJob. tRunJob will start the subjob (database transfer, etc...), on this component you can also select if it schould die on child job error. You need just arange your scenarion to run in sub processes.
Ladislav

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog