0 ×

Top k Selector

KNIME Base Nodes version 4.3.2.v202103021015 by KNIME AG, Zurich, Switzerland

The node behaves the same as a combination of the Sorter node followed by a Row Filter that only keeps the first k rows of the table except for the order of the rows which depends on the Output order settings. Note, however, that the implementation of this node is more efficient then the node combination above. In the dialog, select the columns according to which the data should be selected. For each column you can also specify whether a larger or smaller value is considered as superior.

Options

Settings

Number of rows / unique values
Specifies the mode for the top k selection of the output
  • Rows: Returns the top k rows based on their first occurrence in the input table.
  • Unique values: Returns all rows associated with the top k unique values.
The number of rows to select from the input table based on the specified mode.
Selection criteria
If you want to extend the selection criteria to a higher number of columns as displayed, set the number of columns at the bottom and click 'new columns' to add them to the dialog.

Advanced Settings

Output order
Depending on the settings of the algorithm the order might change in the output and this option allows you to specify constraints on the order.
  • No order: The rows are directly output in the order they are returned in by the algorithm. This option doesn't incur any additional runtime costs. Note: It is possible but not guaranteed that the output order is the same as the input order.
  • Retain order: The input order is reestablished for the rows returned by the algorithm. This requires sorting the output table.
  • Sort output: The rows in the output are sorted according to the specified selection criteria.
Move Missing Cells to end of sorted list
If selected, missing values are always considered to be inferior to present cells.

Input Ports

Icon
Table to select rows from.

Output Ports

Icon
A table containing the top k rows.

Best Friends (Incoming)

Best Friends (Outgoing)

Workflows

Installation

To use this node in KNIME, install KNIME Base nodes from the following update site:

KNIME 4.3

A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

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. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.