Adding and Configuring the Sort Transformation

New: 14 April 2006

In this task, you will add and configure a Sort transformation to your package. A Sort transformation is a data flow component that sorts data, and optionally applies rules to the comparison that the sort performs. The sort transformation can also be used to remove rows of data that have duplicate sort key values.

The sort transformation will sort the data extracted from the Excel spreadsheet by state and by city.

  1. Open the Data Flow designer, either by double-clicking Data Flow Task or by clicking the Data Flow tab.

  2. Right-click the path (the green arrow) between Source - Query and Destination - ProspectiveCustomers and then click Delete.

  3. In the Toolbox, expand Data Flow Transformations, and then drag Sort onto the design surface of the Data Flow tab, below Source - Query. If Destination - ProspectiveCustomers is in the way, click it and drag it to a position lower on the Data Flow design surface.

  4. On the Data Flow design surface, right-click the newly added Sort, click Rename, and change the name to Sort by State and City.

  5. Click Source - Query and drag its green arrow to Sort by State and City.

  6. Double-click Sort by State and City to open the Sort Transformation Editor dialog box.

  7. In the Available Input Columns list, first select the check box to the left of the State column, and then the select the check box by the City column.

    The columns now appear in the Input Column list. State has the sort order 1 and City has the sort order 2. This means that the dataset is sorted first by state and then by city.

  8. In the Input Column list, click the row that contains State. Click the Comparison Flags box, select the Ignore case check box, and then click OK.

  9. Click OK.

  10. Right-click Sort by State and City and then click Properties.

  11. In the Properties window, verify that the LocaleID property is set to English (United States).

Community Additions