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.
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.
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"
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
ubsequent conditions
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.