Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am trying to process set of file in a directory, would like to check all the files and it's record count. flow 1 - process the files which has record count>0 flow 2 - move the empty file to audit folder.
I tried the below approach, end with the error.
@prithivt ,can you try below one working.
if(input_row.size!=null && input_row.size==0){
globalMap.put("isEmpty", true);
}else{
globalMap.put("isEmpty", false);
}
@prithivt , what are you doing in tJavarow? Please share what you have written, since you need to apply nulvalidation first and then you need to do other part like calculation other stuff.
Thank you for your response.
Below is my code to check the file size in tJavaRow component. after that by using the isEmpty variable i am creating two flows to process further,
if(input_row.size==0){
System.out.println("File record count is 0");
globalMap.put("isEmpty", true);
}
else{
System.out.println("File record count is > 0");
globalMap.put("isEmpty", false);
}
@prithivt ,can you try below one working.
if(input_row.size!=null && input_row.size==0){
globalMap.put("isEmpty", true);
}else{
globalMap.put("isEmpty", false);
}
Thank you it is working now.