The following node is available in the Open Source KNIME predictive analytics and data mining platform version 2.7.1. Discover over 1000 other nodes, as well as enterprise functionality at
http://knime.com.
Row Filter
The node allows for row filtering according to certain criteria.
It can include
or exclude: certain ranges (by row number), rows with
a certain row ID, and rows with a certain value in a
selectable column (attribute). Below are the steps on how to configure the node
in its configuration dialog. Note: The node doesn't change the domain of the
data table. I. e. the upper and lower bounds or the possible values in the
table spec are not adapted, even if one of the bounds or one value is
fully filtered out.
Dialog Options
- In- or exclude rows by criteria
- You must first select which criteria should
be used for filtering from the left-hand side. Also choose
whether to include or exclude rows according to the selected criteria.
Depending on the choice, you will then have to adjust the filter parameters in the right-hand panel.
- Column value matching
- If filter by attribute value is
selected, select the name of the column whose value should be matched. Then,
either enter a pattern for string matching, or a value range,
for range filtering. When using a pattern match, you can set checkmarks
according to whether the pattern contains wildcards or is a regular
expression. Wildcard patterns contain '*' (matching any sequence of
characters) and '?' (matching any one character). Examples of regular
expressions are given below. Also, a case sensitive match can be enabled
by the according checkmark. Note: if you select a pattern from the drop-down
menu of the pattern text field, the node still performs a comparison of
the string representation of the data values.
If a range is specified, and you specify only one boundary, the other
is then set to (plus or minus) infinity.
Here are some examples of regular expressions:
"^foo.*" matches anything that starts with "foo". The '^'-character
stands for the beginning of the word, the dot matches any (one) character,
and the asterisk allows any number (including zero) of the previous character.
"[0-9]*" matches any string of digits (including the empty string).
The [ ] define a set of characters (they could be
added individually like [0123456789], or by range). This set
matches any (one) character included in the set.
For a complete explanation of regular expressions see e.g. the JavaDoc
of the
java.util.regex.Pattern class.
- Row number range
- If filter by range is selected, specify
the first row number to in/exclude. The end of the range can either
be specified by row number, or set to the end of the table, causing
all remaining rows to be in/excluded.
- Row ID pattern
- If filter by row ID is selected, specify
a regular expression, which is matched against the row ID of each row.
A checkmark can be set, if a case sensitive match should be performed
and if the row ID should start with the specified pattern.
Ports
Input Ports
0 |
Datatable from which to filter rows. |
Output Ports
0 |
Datatable with rows meeting the specified criteria |
This node is contained in KNIME Base Nodes
provided by KNIME GmbH, Konstanz, Germany.