Adding a Rank Operator

Assign a rank number to records in the same group.

  1. On the Application page, click   and select Rank   in the Add Operator pane.

    The Rank node   icon displays in the Graph pane, as well as the properties to be defined in the
    Operator Settings pane, and the preview of the data in the Schema pane.

    The right (outbound) edge allows you to connect to the other operators.

  2. In the Operator Settings pane, define or select the following required properties:
    Property Description

    Node ID

    The ID of the rank operator.

    Inputs

    The stream of records or input you will be subscribed to.

    Interval

    How often the collected data should be sorted, ranked, and output (in milliseconds).

    Rank Field

    The name of the rank number field in the output.

    Rank Percentile

    The name of the percentile field in the output. This is the rank number divided by the number of records in the group.

    Reference

    The input field to sort records on when ranking them.

    Sort Order

    The order to sort the records: ASCENDING (the lowest value gets rank one) or DESCENDING (the highest value gets rank one).

    Cumulative Sum

    The cumulative sum based on the currently applied sort order for each Reference value.

    You can opt to specify a new value in the Into field. This column will be added in the Output schema.

    Group By

    The name/IDs of the fields that the data will be grouped by. Records are ranked within each group. (Proceed to step 3.)

     

  3. In the Group By section, click   .  A column is added in the list. Click the drop-down list to select the column that will be used to group the data.

    The INPUT and OUTPUT schema are displayed.

    Repeat step 3 to add more.

    Two columns are added in the Output schema: <Rank Field> and the <Rank Percentile>. For example:

    If you set a name for the Cumulative Sum, it will also be added in the Output schema.

    You can also delete a column in the Group By list by selecting its check box and clicking .

  4. Save the changes.

 

Example

 

 

(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support