Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

exiting a job under certain conditions

Hello everyone

I have a requirement in TalenDI 6.4 to exit the job without doing any work under certain conditions.

Example: Job reads a value from a database and if the value is not found (or a certain value or null is returned) then simply exit job.

So it is not error condition, I don't want to crash the job, I simply do not want it to proceed any further from this point onwards.

What is the easiest way to deal with this?

I am not sure if calling System.exit() from tJava is a good idea or even supported by Talend DI ?

I guess I am looking for something like tJobExit (which does not seem to exist in DI 6.4.1).

thanks!

 

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi YuriB,

You can set the condition in the tMap expression filter -- ((Integer)globalMap.get("<dbcomponent>_1_NB_LINE")) > 0.

It will check the number of records returned by the database component. If it's null it will not proceed further.

 

Best Regards,

Abhishek

 

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi YuriB,

You can set the condition in the tMap expression filter -- ((Integer)globalMap.get("<dbcomponent>_1_NB_LINE")) > 0.

It will check the number of records returned by the database component. If it's null it will not proceed further.

 

Best Regards,

Abhishek

 

Anonymous
Not applicable
Author

thanks, I will check this out.