Row filter

Hello everyone
I’m having some trouble using the row filter node.
I have a reoccurring sequence of rows that start with the numbers 100-127. The information or text I need is on the row starting with 118. I’ve tried to include rows by row ID, and I enter 118. But it doesn’t seem to work. If anyone could help or point me in the right direction on how to configure this node or to use another node it would be much appreciated. Note: i have a workflow extracting data from docx file using tika parser etc.

Hi @NabilEnn, do you mean RowID or row number?

Typically RowID have names like “Row118”, whereas row numbers are numeric and start at 0 (or 1 depending on the node) … or both! see note at end :roll_eyes: )

So if by Row 118 you mean the 118th row then in Row Filter which uses 1 to specify Row0 *, then you would use this config:

But if you mean RowID Row118 (typically the 119th row), you would use this config:

  • note on Row Filter Row Numbers:

In Row Filter, to specify by Row Number manually, the row numbers begin at 1, unlike many other nodes where the first row is given the index 0. So if you request row number 1, you get (row index 0) - RowID “Row0” )

However if you are setting the row number using a flow variable, and you pass it the number 1, you will actually get row number 2 (row index 1 - RowID Row1)! I think the developer was having a laugh that day! :rofl:

It’s a KNIME “gotcha” and is almost unique among nodes in that the value you pass in as a flow variable differs from the value you would enter manually. So beware!)

2 Likes

@takbb Thanks for the reply, sorry I was not detailed. It’s actually in my content column. By rows I meant lines. So in my content column I have probably about 100k lines the data I need are in the lines that start with 118. How could I set my workflow to only show me 118 and filter everything else out.

Hi @NabilEnn , My apologies, as I realise I had misread part of your initial post. So you mean the data itself begins with “118”?

If my understanding is now correct, you could use a row filter like this, using your data column as the “Column to test”.

I’m assuming that it’s actually a string column, that starts with some numeric characters.

If that’s still not doing what you need, and I’m still misunderstanding, then maybe upload a screenshot of what some of your data looks like, (with anything sensitive removed of course).

1 Like

@takbb okay I will try that. Do you also know how to fix the issue with the error message of “max length 32767 characters in one cell? I have cell splitter configured with a delimiter \n and output set to “as list”

Hi @NabilEnn , When do you see that error? It sounds like an excel issue but I don’t see any mention of excel above or is this a totally new question (if so, probably best to ask it in a new thread).

@takbb Will do thanks

1 Like