The Integration Service uses cache memory to process Rank transformations. It stores data in rank memory until it completes the rankings.
When the Integration Service runs a session with a Rank transformation, it compares an input row with rows in the data cache. If the input row out-ranks a stored row, the Integration Service replaces the stored row with the input row.
For example, you configure a Rank transformation to find the top three sales. The Integration Service reads the following input data:
SALES
10,000
12,210
5,000
2,455
6,324
The Integration Service caches the first three rows (10,000, 12,210, and 5,000). When the Integration Service reads the next row (2,455), it compares it to the cache values. Since the row is lower in rank than the cached rows, it discards the row with 2,455. The next row (6,324), however, is higher in rank than one of the cached rows. Therefore, the Integration Service replaces the cached row with the higher-ranked input row.
If the Rank transformation is configured to rank across multiple groups, the Integration Service ranks incrementally for each group it finds.
The Integration Service creates the following caches for the Rank transformation:
Data cache.
Stores ranking information based on the group by ports.
Index cache.
Stores group values as configured in the group by ports.
By default, the Integration Service creates one memory cache and disk cache for all partitions.
If you create multiple partitions for the session, the Integration Service uses cache partitioning. It creates one disk cache for the Rank transformation and one memory cache for each partition, and routes data from one partition to another based on group key values of the transformation.