String comparison / filter

Hi,

I'm trying to loop over rows in a column, and output a table which contains only rows which meet my criteria. For instance, I want to loop over values in a column and output only those rows which are equal to a certain criteria. In my example, I have a lot of rows which has blanks or the character "?". I want to filter these out and retain the rest of the values

Is there a string comparator node? Or Im complicating things and there is a filter node? 

Thanks

Try the row filter node.

choose to exclude rows by criteria, and choose missing values as the criteria. 

Alternatively use the Missing Values node.

youve also got the Rule Based Row Filter node too.

no need for loops!

simon.

Great thanks ! That was quick

Not to forget the "reference row filter" node, a personal favourite of mine.

E

Hello Richards,

I have same issues but i have many  columns and i compare only 3 columns   row wise ...suggest me code i am begineer ...

 

Thanks in advance

I'm trying to loop over rows in a column, and output a table which contains only rows which meet my criteria. For instance, I want to loop over values in a column and output only those rows which are equal to a certain criteria. I want to filter these out and retain the rest of the values..i have written code for that is

 

int m=1; 
// expression start
  public void snippet() throws TypeException, ColumnException, Abort {
// Enter your code here:
for(int i=1; i<=51; i++)
{
 for(int j=2; j<=52; j++){
  if (c_Startzelle(i).equals(c_Startzelle(j)) && c_Zielzelle(i).equals(c_Zielzelle(j)) && c_Wochentag(i)==c_Wochentag(j) && abs(c_UhrzeitBeginndesWeges(i)-c_UhrzeitBeginndesWeges(j))<100 && abs(c_UhrzeitEndedesWeges(I)-c_UhrzeitEndedesWeges(j)<100)) {
   
  out_Trip1 = ROWID(i);
  out_Trip2 = ROWID(j);
  out_AddTime = (c_UhrzeitBeginndesWeges(i)-c_UhrzeitBeginndesWeges(j)+c_UhrzeitEndedesWeges(i)-c_UhrzeitEndedesWeges(j));
  m=m+1;
  }
 } 
}

 

 

I am beginner having not enough Idea what to do...Starzelle(i) and StartZelle(j) are in differend rows but in same columns and they are strings ...same with others in rows in columns ...Can you suggest me simple code ...

 

 

Thanx in Advance:

this is the table and the code I need help ...

Hi

you are not looking for a filtering you look for a join.

Use a joiner on (both inputs port get your data table) the data. Join on Startzelle, Zielzelle and Wochentag.

Now calculate the differences between the Uhrzeiten using a math node. And finally use a rule based row filter to filter the redundant rows.

However applying this on 51 Mio Rows... Will take quiiiiiiiiiiiiite some time.

Iris