0 ×

Row Splitter (col+)

StreamableGeneric Nodes - Node extension for KNIME Workbench provided by Lhasa Limited version 1.2.100.v201711091216 by Lhasa Limited

The node allows for row splitting 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 the selected columns (attribute).

The RowFilter node has been adapted to allow for multiple column selection to perform the attribute matching (include and exclude). It is possible to match based on a single column match (only one must return true) or every column match (all must return true).

Example usage: String column with numbers, int column and a double column. Using the pattern 1 will return matches for "1" in the int column and the String column however will not match the double column. To match the value '1' on a double column the pattern needs to be '1.0'. If you want the same match to work accross these three columns then you can use the regex: '(1|1\.0)' (no quotes) which makes the '.0' optional.

Range filtering on mixed column types is not recommended. It is best to use all Int columns, all Double columns or all String columns etc. Although filtering on Strings will likely give unexpected results.

Options

Include or exlcude
Include rows when a positive match occurs will add the true matches to the first output. Exclude provides the reverse functionality.
Column value matching
Select the columns to be used in the matching. The configured matching criteria will be checked against each selected column.
Match all
If true (match all) then each column must be match the given criteria to be a positive match. Otherwise only a single column must match. Example behaviour: with excluding values when Match all is selected all columns must contain the filter criteria for the row to be excluded. When this option is not selected the row will be excluded if any column contains the match criteria. The same behaviour is seen for missing values, when selecting Match all every column must have a missing value for that, if only some or none the row will not be excluded.
Match criteria
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.

Input Ports

Datatable from which to filter rows.

Output Ports

Datatable with rows meeting the specified criteria
Datatable with rows not meeting the specified criteria

Best Friends (Incoming)

Best Friends (Outgoing)

Workflows

Update Site

To use this node in KNIME, install Generic Nodes - Node extension for KNIME Workbench provided by Lhasa Limited from the following update site:

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform.