Double-click the ExtSort component.
Click the Sort key row in the component editor. A button appears in this row.
Figure 3.2. Editing ExtSort Component
Use the button to open Sort Key dialog:
Figure 3.3. Selecting a Sort Key
Select the key that will be used for sorting the incoming records.
Salary item from the
Fields pane and drop it to the Sort key pane.
Do the same with
FirstName items in this order.
Figure 3.4. Sort Key Selection
Click the cell in the Order column right from the
Descending instead of
This way you have selected the fields according to which the incoming records should be sorted.
The records will be sorted according to the
salary field values in descending order.
Records with same
salary will be sorted according to
lname in ascending order.
Records the same
lname will be sorted according to
fname in ascending order.
Thus, any person with
25000 would be sent out after any other person with
And, within the same
Brown would be sent out
through the output port before any
And again, within the same salary, any
John Smith would be sent
out before any
In other words, the fields located higher in the Key parts pane have higher sorting priority.
Figure 3.5. Sort Key Selection
After clicking OK, a sequence of field names separated by semicolon will appear in the component editor:
Figure 3.6. Sort Key Appearance
Run the graph and see the results.
You can see that all salaries are sorted in descending order.
Note that within the same salary of 30000 both
Albert Brown lies higher than