Row Filter Node with variable range not working

Hi there,
not sure if I configured it wrongly so just wanted to ask
I try a simple integer input to set the RowRangeEnd. So lets say I use a 10 then I like to get the first 10 records filtered.
However the filter does not work at all?
What am I missing?

Thanks and best

Hi @Daniel_Weikert

If you want to filter the first 10 lines, or filter the first ‘N’ lines based on the input variable then make sure:

  • In the settings of the Row Filter node make sure you have selected the option “Include rows by number”.
  • Set the option Row number range> First row Number > with the value 1 and
  • Edit the variable, in the flow variable tab, option RowRangeEnd with your dynamic Integere variable.

This will provide you with the desired result.

As an example I am sending you a workflow, which also contains the Row Sampling node, I imagine that you will find it interesting to be used in this case.

RowFilterWithVariable.knwf (10.6 KB)

1 Like

Thanks
that is actually exactly what i did

the integer is set to 1 but it returns the whole table (2 rows in this case)

hey @Daniel_Weikert

If your table contains only two rows, the result of the output is correct.

The output is from the first row Row0 to the line you indicated Row1.

He’s returning to line number 1, remember that he starts counting on Row 0.

To select an exact number of lines, see the sample with Row Sampling node.

Hello @Daniel_Weikert,

this is a small but unfortunate bug in Row Filter that every proper KNIME user experienced :smiley:

There is a new node, Row Filter (Labs), that should work as expected.

Br,
Ivan

Thanks everyone for your answers

I don’t think row filter is zero based as when you choose filter row 1:1 you get exactly 1 output. If it was zero based I would expect to have 0:1 in the interface. Nonetheless I highly appreciate your answer
@natanaeldgsantos . Thank you!

@ipazin
It’s not a bug it’s a feature :wink:
Will try the row filter labs

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.