Run If Number of rows in the input file are greater than 1

Four Stars

Run If Number of rows in the input file are greater than 1

Hello,

 

I am trying to create a job, where I read a csv input file, and if the number of rows>1, it should run and pick the file and place into FTP location.

I have used tfileinputdelimited-->tjavarow-->tftpPut

I am stuck at tjavarow. How do I write a condition where it checks for number of rows >1. Please see the job img.JPG


Accepted Solutions
Nine Stars

Re: Run If Number of rows in the input file are greater than 1

You don't need tJavarow for this.

Connect tfileinputdelimited-->runif trigger-->tftpPut.

And put the condition for runIf as -

((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) > 1
Nine Stars

Re: Run If Number of rows in the input file are greater than 1

I had suggested to use the "Run If" trigger and not "On Component Ok".

All Replies
Nine Stars

Re: Run If Number of rows in the input file are greater than 1

You don't need tJavarow for this.

Connect tfileinputdelimited-->runif trigger-->tftpPut.

And put the condition for runIf as -

((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) > 1
Four Stars

Re: Run If Number of rows in the input file are greater than 1

 
Nine Stars

Re: Run If Number of rows in the input file are greater than 1

I am guessing you have the runif trigger already established between your two components - meaning you have both of them connected. Now, right click on the runIf connector - click settings - and you would be presented with Basic Settings -> Condition. Have your condition at that section.
Four Stars

Re: Run If Number of rows in the input file are greater than 1

 
Nine Stars

Re: Run If Number of rows in the input file are greater than 1

I had suggested to use the "Run If" trigger and not "On Component Ok".
Four Stars

Re: Run If Number of rows in the input file are greater than 1

Thank you so much.. !!!