Top k Row Filter

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.
Sorting criteria
To refine the sorting/selection criteria click the button at the bottom labeled 'Add sorting criterion'.

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.

Views

This node has no views

Workflows

Links

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.