The Sorter transformation contains only input/output ports. All data passing through the Sorter transformation is sorted according to a sort key. The sort key is one or more ports that you want to use as the sort criteria.
You can specify more than one port as part of the sort key. When you specify multiple ports for the sort key, the Integration Service sorts each port sequentially. The order the ports appear in the Ports tab determines the succession of sort operations. The Sorter transformation treats the data passing through each successive sort key port as a secondary sort of the previous port.
At session run time, the Integration Service sorts data according to the sort order specified in the session properties. The sort order determines the sorting criteria for special characters and symbols.
The following figure shows the Ports tab configuration for the Sorter transformation sorting the data in ascending order by order ID and item ID:
At session run time, the Integration Service passes the following rows into the Sorter transformation:
After sorting the data, the Integration Service passes the following rows out of the Sorter transformation: