Rank
The Rank processor performs rank calculations for every input record based on a group of records. The processor performs calculations within a single batch; it does not calculate across multiple batches.
To group the records, you define the field to partition the data by. The Rank processor redistributes the input data by the specified field, placing records with the same value for the specified field in the same partition. To order the records within each partition, you define the field to order the data by. The processor orders the records in each partition, and then calculates the rank for each record.
For example, let's say that you want to rank employee salaries within each department. You configure the Rank processor to partition the data by the department field and then to order the data by the salary field. The processor ranks the salaries within the Sales department and separately ranks the salaries within the Marketing department.
The Rank processor passes all input fields to the output record, adding an additional output field to the record for each rank calculation.
When you configure the processor, you define the rank functions to calculate and the output field to use for each calculated value. The processor can perform multiple rank calculations. You also specify the field in the record to partition the data by and the field in the record to order the data by.