Scenario 12: How to get top 5 records to target without using rank ?

Solution:

  1. Drag the source to mapping and connect it to sorter transformation.

source sorter mapping

  1. Arrange the salary in descending order in sorter as follows and send the record to expression.

sorter properties

  1. Add the next value of sequence generator to expression.(start the value from 1 in sequence generator).

sorter to exp mapping

  1. Connect the expression transformation to a filter or router. In the property set the condition as follows-

filter

  1. Finally connect to the target.

final mapping sc12