Rank Index
When you create a Rank transformation, a default column gets created called Rank Index. This port, if required, can generate numbers indicating the Rank. This is an optional field that you may use if required. If you do not wish to use Rank Index, you can leave the port unconnected.
Suppose you have following data belonging to the SALARY column in the source:
SALARY
100
1000
500
600
1000
800
900
When you pass the data through Rank transformation and define the condition to get the top five salaried records, the Rank transformation generates the Rank index as indicated here:
Rank_Index
Salary
1
1000
1
1000
3
900
4
800
5
600
As you can see, Rank index assigns rank 1 to the same salary value and assigns 3 to the next salary since it is actually 3rd in the sequence. So, if you have five records with 1,000 as salary in the source along with other values and you defined the condition to get the top five salaries, Rank transformation will give all five records with 1,000 salary and reject all others.
With this, you have learned all the details about Rank transformation.