Restart Job

Five Stars

Restart Job

Hi!

 

I use an Oracle database engine, I would like to know how I can manage the exceptions due to the lack of availability of the database (restarts, connection, blocking of tables, among others), since the database has failed, the work (Talend) will stop automatically, but I want it to start again automatically when the database becomes available again.
How can I do this?

 

Thanks! 


Accepted Solutions
Six Stars

Re: Restart Job

Hi Fred,

 

While using DB Components, best way is to implement using prejob and postjob. we have used prejob for DB connections on either success or failure (ex. connection may fail because of invalid credentials or network issue) and postjob for commit and close connections. These DB connections we trigger through onComponentError/onComponentOK with the global variable message error. we capture it through tWarn or tDie components by adding the connection variables.


Error Message (tDie):

"Error in Oracle Connection"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Success Message (tWarn):

"Connection is Successful"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Use Commit and Rollback functionality for each subjob at the output component, which helps to save the transaction only if it completes.

 

 

Additionally, 

we have used Error Recovery Check point for each subjob, while helps to recover the last failed job and it will continue the process 

 

Adding the screenshot for your reference.


All Replies
Six Stars

Re: Restart Job

Hi Fred,

 

While using DB Components, best way is to implement using prejob and postjob. we have used prejob for DB connections on either success or failure (ex. connection may fail because of invalid credentials or network issue) and postjob for commit and close connections. These DB connections we trigger through onComponentError/onComponentOK with the global variable message error. we capture it through tWarn or tDie components by adding the connection variables.


Error Message (tDie):

"Error in Oracle Connection"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Success Message (tWarn):

"Connection is Successful"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Use Commit and Rollback functionality for each subjob at the output component, which helps to save the transaction only if it completes.

 

 

Additionally, 

we have used Error Recovery Check point for each subjob, while helps to recover the last failed job and it will continue the process 

 

Adding the screenshot for your reference.

Five Stars

Re: Restart Job

Thank you!

 

With this, at what point would the automatic restart of the job in case of database failure?

 

The component that you called "Connection Failure" is a tDie?

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.