Accepted variable values for RowFilter_TypeID in the Row Filter node

I am looking to use a flow variable to determine the type of filtering performed in a Row Filter node. The variable should select the radio button on the left here:

The variable for this is “RowFilter_TypeID” of type string:

What are the accepted values for this variable? I want to select between option 1 (include rows by attribute value) and option 2 (exclude rows by attribute value) depending on the value of the flow variable “FilterTypeID” in my screenshots.

I am using v4.4.1 of KNIME.

Thanks,
Andrew

If you configure the node the way you want, then type in a variable name in that textbox to the right (under the Flow Variables tab), and then execute the node, a variable will be created that corresponds to the configuration.

In your case, if I configure the node like this:

and then type in a variable name in the RowFilter_TypeID field

I get the value that corresponds to the configuration I set:
image

The thing about this node is that this variable reflects more than just the overall filter type.

  • Include/Exclude rows by attribute value + use pattern matching = StringComp_RowFilter
  • Include/Exclude rows by attribute value + use range checking = RangeVal_RowFilter
  • Include/Exclude rows by attribute value + only missing values match = MissingVal_RowFilter
  • Include/Exclude rows by number = RowNumber_RowFilter
  • Include/Exclude rows by row ID = RowID_RowFilter

If you want to use the Include option, then you’d have to use true for the include variable field
If you want to use the Exclude option, then you’d have to use false for the include variable field

The list of applicable flow variables changes depending on the selected filter type, so I’m not sure that trying to define them all outside of the Row Filter node would work. However, since you just want to pick between options 1 and 2, the node would have to be preconfigured with either 1 or 2 selected, and then the variables would slot right in.

Give it a shot and let us know how it goes.

2 Likes

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