Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
PaulyWally
Contributor III
Contributor III

Trigger: Run If + On Subjob OK

I would like to trigger a subjob with two inclusive conditions:

  1. On Subjob OK
  2. ((Integer)globalMap.get("tDBInput_1_NB_LINE")) > 0

The main subjob extracts source data using

tDBInput_1, and flows into 1 of 2 outputs - an UPSERT or a DELETE.

I have a 2nd subjob that increments the change version. But I only want to increment the change version if tDBInput_1 has more than 0 rows, and also if the UPSERT and DELETE outputs do not fail.

Please see attached image.

Any ideas? TIA!

Labels (2)
5 Replies
tnewbie
Creator II
Creator II

From the little I understood, you may take the 'on subjob ok' to a step prior / backwards. As I don't see your entire flow, this is just my 2 cents

PaulyWally
Contributor III
Contributor III
Author

The rest of the flow is irrelevant. What I need is for the "Increment Change Version" to execute only if both conditions are true within the subjob that is shown in the pic:

 

  1. CT_dbo_Task row count is greater than 0
  2. The subjob shown in the pic completes without error

 

Using 'On Subjob OK' will trigger the "Increment Change Version" even if there are no rows. And using an 'Run If' will trigger the "Increment Change Version" even if tMap, Upsert, or Delete fail on an error.

Prakhar1
Creator III
Creator III

a tJavaFlex may help.

CT_dbo_Task -->OnSubJobOk --> tJavaFlex --> RunIf (your Condition ) --> Increment Change Version

hanghan
Contributor III
Contributor III

0693p00000BVamnAAD.jpg

JohnRMK
Creator II
Creator II

Best Practice also 🙂