Rule Based Row Filter - Capitalized Text

All,

I have a rule based row filter in which I am trying to filter based on text ex: “john”. However, when the text in excel doc is formated as “JOHN” I am not picking it up.

I would rather not use another OR function to fix this. Is there another way to have to node not consider capital letters?

Thanks,

RJ

KNIME is case sensitive. If you want to preserve original values, duplicate them and convert to the same case.

1 Like

Hi @rparr009 , as @izaychik63 said, Knime is case sensitive.

I am guessing, in your Rule-based Row Filter, you probably have something like this:
$column1$ = "john" => TRUE

If you don’t want case sensitivity to affect this rule, you just need to make sure that your column data is all in lower or upper case beforehand, and then apply the rule accordingly. In my example, I will convert the data to lower case, and you can do this via the String Manipulation node with the lowerCase() function, like this:

You can either replace the original column with the manipulation, or decide to add it as a new column.

You can then apply your rule on the lower cased column.

Here’s a sample workflow:
image

Input data:
image

Filtered data on “john”:
image

And here’s the workflow: rule-based row filter case insensitive.knwf (8.1 KB)

4 Likes

hi @rparr009 ,

A single node solution may be to use Regex in a standard ‘Row Filter’ node:

(?i)(john)

image

image

Regards

3 Likes

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