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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sunbaj
Contributor III
Contributor III

[resolved] Abort a job

I need to abort the job if any row in an excel file contains null. Basically I have a input file with 3 columns. My requirement is that if any of the 3 fields contain null then the job should abort.
How do I achieve this.
Labels (2)
1 Solution

Accepted Solutions
sunbaj
Contributor III
Contributor III
Author

Sorry for the late response as I was travelling.
I basically wrote the records in a file where any of the fields were null and then checked for the record count in the file and aborted the process accordingly.

View solution in original post

10 Replies
sunbaj
Contributor III
Contributor III
Author

I actually had this condition in my tMap and I was expecting it to fail automatically when the field value was Null but to my surprise it did not.
row2.Category.equals("Transfer to Self") ||row2.Category.equals("Fixed") || row2.Category.equals("Credit")?"0":"1"
Anonymous
Not applicable

Hi,
The expression in tMap should be
Condition?value if true: value if false

.
Are you looking for
row2.Category==null || row2.Category.isEmpty())?"1":"0"

.
Best regards
Sabrina
sunbaj
Contributor III
Contributor III
Author

No I am not looking to bypass the Null or Empty condition. I want to actually abort the job itself as I need to then manually correct the file and then reprocess it again.
This is something that I amlooking into
row2.Category==null || row2.Category.isEmpty())?Abort the Process 0683p000009M9p6.pngubsequent conditions
sunbaj
Contributor III
Contributor III
Author

Any suggestions please ???!!!!
gorotman
Creator II
Creator II

Hi,
do you need to abort the job immediately?
If you don't, you can write rows that contain null values to a reject flow (out of tMap). Thus you can abort job if number of rows in reject file is >0.
sunbaj
Contributor III
Contributor III
Author

I wanted to avoid this option but if there is no other way then possibly will have to go this route.
Anonymous
Not applicable

hi all
use if condition that check number of row in the flow
tDie if == 0 , something else if not.
((Integer)globalMap.get("tLogRow_1_NB_LINE")) == 0

ps : in advanced setting of tDie you've got an option permiting to stop the job immedialtly
regards
laurent
0683p000009METI.png
Anonymous
Not applicable

That option is called Exit JVM.
Vaibhav
Anonymous
Not applicable

Hi sunbaj,
Is there any update for your issue?
Best regards
Sabrina