You are on page 1of 1

Rank Index

The Designer creates a RANKINDEX port for each Rank transformation. The Integration Service uses the Rank
Index port to store the ranking position for each row in a group. For example, if you create a Rank
transformation
that ranks the top five salespersons for each quarter, the rank index numbers the salespeople from 1 to 5:
RANKINDEX SALES_PERSON SALES
1 Sam 10,000
2 Mary 9,000
3 Alice 8,000
4 Ron 7,000
5 Alex 6,000
The RANKINDEX is an output port only. You can pass the rank index to another transformation in the mapping
or
directly to a target.

Defining Groups
Like the Aggregator transformation, the Rank transformation lets you group information. For example, if you
want
to select the 10 most expensive items by manufacturer, you would first define a group for each
manufacturer.
When you configure the Rank transformation, you can set one of its input/output ports as a group by port.
For
each unique value in the group port, the transformation creates a group of rows falling within the rank
definition
(top or bottom, and a particular number in each rank).
Therefore, the Rank transformation changes the number of rows in two different ways. By filtering all but the
rows
falling within a top or bottom rank, you reduce the number of rows that pass through the transformation. By
defining groups, you create one set of ranked rows for each group.
For example, you might create a Rank transformation to identify the 50 highest paid employees in the
company. In
this case, you would identify the SALARY column as the input/output port used to measure the ranks, and
configure the transformation to filter out all rows except the top 50.
300 Chapter 20: Rank Transformation
After the Rank transformation identifies all rows that belong to a top or bottom rank, it then assigns rank
index
values. In the case of the top 50 employees, measured by salary, the highest paid employee

You might also like