Scenario based Question in Talend???

Seven Stars

Scenario based Question in Talend???

How can I stop a job after 3 failures in talend?

Accepted Solutions
Ten Stars

Re: Scenario based Question in Talend???

Isn't 1 failure just enough?  Except time outs ... File not there yet ... kinda time-based related things.

But 3 Is just planning for more failure and is 'bad' design. 3 sounds arbitraty, why not 4 or 5 ...  I dont get this type of reasoning. Why please elaborate?

 

Possible solution:

OnComponentError / OnSubJobError  ----> tJava 

// check if exists
Integer  cnt =(Integer) globalMap.get("error_counter");
if cnt != null {
cnt ++; 
globalMap.put("error_counter", cnt );
if cnt.equals(3)  { 
// raise exception to make sure it dies...
  throw new Exception(); 
  }
}else { globalMap.put("error_counter", 1 ) ; }

after tJava a tDie/tWarn component to do whatever you want to do ... 

 

View solution in original post


All Replies
Twelve Stars

Re: Scenario based Question in Talend???

add an other job who call your job using 3 tRunJob and link tRunJob by onComponentError.

It's Done.
Regards

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Seven Stars

Re: Scenario based Question in Talend???

Can you please provide me complete job design ?
Twelve Stars

Re: Scenario based Question in Talend???

it is complete.
create a new job.
slide jour job inside 3times. (it will add 3 trunJob components)
link your 3 trunjob using onComponentError
Regards,

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Ten Stars

Re: Scenario based Question in Talend???

Isn't 1 failure just enough?  Except time outs ... File not there yet ... kinda time-based related things.

But 3 Is just planning for more failure and is 'bad' design. 3 sounds arbitraty, why not 4 or 5 ...  I dont get this type of reasoning. Why please elaborate?

 

Possible solution:

OnComponentError / OnSubJobError  ----> tJava 

// check if exists
Integer  cnt =(Integer) globalMap.get("error_counter");
if cnt != null {
cnt ++; 
globalMap.put("error_counter", cnt );
if cnt.equals(3)  { 
// raise exception to make sure it dies...
  throw new Exception(); 
  }
}else { globalMap.put("error_counter", 1 ) ; }

after tJava a tDie/tWarn component to do whatever you want to do ... 

 

View solution in original post

Highlighted
Seven Stars

Re: Scenario based Question in Talend???

My question is.

I want to kill the job after 3 times failed.
Can I implement that without writing tjava code
Tags (1)
Ten Stars

Re: Scenario based Question in Talend???

Yes but its very inefficient like :
tRunJob --> OnComponentError -->tRunJob --> OnComponentError -->tRunJob --> OnComponentError --> tDie
This is what @fdenis is suggesting but doesnt take into account a specific component where you want to set a limit of errors.

There should be some sort of error count within Talend ... and within tDie and tWarn ... die after max threshold

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog