Developer Transformation Guide > Sorter Transformation > Sorter Transformation Overview
  

Sorter Transformation Overview

Use a Sorter transformation to sort data in ascending or descending order according to a specified sort key. You can configure the Sorter transformation for case-sensitive sorting and for distinct output. The Sorter transformation is an active transformation.
When you create a Sorter transformation, you specify ports as sort keys and configure each sort key port to sort in ascending or descending order. The Data Integration Service sorts each port sequentially when you specify multiple ports for sort key.
For example, you need to create an invoice for the overall customer sales from a customer database. Use a Sorter transformation on the customer sales table to sort the data in descending order according to the customer number. Use the result of the Sorter transformation as an input to the Aggregator transformation. You can increase Aggregator transformation performance with the sorted input option.
The following figure shows the mapping:
The mapping shows a source and a Sorter transformation that sorts the customer sales by customer number. The Sorter transformation is linked to an Aggregator transformation that calculates the total daily sales for each customer and writes the results to a flat file target.