Using the to global var in tSystem component

Highlighted
Six Stars

Using the to global var in tSystem component

Hi ,

 

I have a job(Main_Job) which calls other jobs(like Job_1, Job_2, Job_3) by using Tsystem component jobs sequentially. 

Here my requirement is,  if the Job_1 fails i want to capture it in Main_job and kill the remaining jobs which are in the queue.

 

Can anyone please help me how to capture the error into a context or table.

Thanks in advance.

 

Regards

ShaX

Community Manager

Re: Using the to global var in tSystem component

Hi
Can you upload a screenshot of your current job design? It will be helpful for us to understand your problem well.
Thanks!
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: Using the to global var in tSystem component

Hi @shong ,

 

PFA images,

 

As you can in the Caprure1, Before calling the job from Tsystem component, am inserting the job name as "R" in JOBMASTER & JOBEXECUTION, on the called job is completed am updating "R" as "C" and if the job fails i want to update as "F" which am doing as seen in the Capture2.

 

Regards

ShaX

 

Six Stars

Re: Using the to global var in tSystem component

Any help on this please

Community Manager

Re: Using the to global var in tSystem component

Hi
What's the error messages thrown on tSystem ? Can you show an error example? I see you have used tLogCatcher component in the job to capture the Java exception or tDie's error.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: Using the to global var in tSystem component

Hi @shong ,

 

Suppose am calling 4 jobs using TSystem, in 3rd job i got error like "Table or view doesn't exist".

I can see this error on console.

 

Here my requirement is to kill the job when an error occurs, instead of calling the next job, which is not happening now.

Please help me how to catch errors coming from TSystem component and kill other jobs in sequence.

 

Regards

ShaX

Eight Stars

Re: Using the to global var in tSystem component

Hi @ShaX ,

 

By default tSystem Error is passed through Console.

 

In the basic settings of tSystem chose Standard Output and Error Output to "to Global variable" and call the Global variable in tJava to get the error output.

 

In addition you can also use the Exit Value Global variable for tSystem in the run if condition to pass the control to your sub Jobs.

 

((String)globalMap.get("tSystem_1_ERROROUTPUT"))

 

((Integer)globalMap.get("tSystem_1_EXIT_VALUE"))!=0

 

TSYSTEM.JPG

 

Thanks and Regards,

Subhadip

 

 

 

 

Six Stars

Re: Using the to global var in tSystem component

hi @subhadip13 ,

Thanks for your reply Smiley Happy

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

Talend Studio Improvements for API Services

Take a look at the Talend Studio improvements for API Services

Watch Now

Data Integration Success Stories

Take a look at some Data Integration success stories

Read