Restart Job

Six 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.

Six 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?

Six Stars

Re: Restart Job

yes, the main intention of using tDie is to exit the JVM Immediately. see the advanced settings in a tDie component.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog