Sorter Transformation in Informatica

The Sorter Transformation in Informatica is used to sort the source data in either Ascending or Descending order, similar to SQL command ORDER BY Statement.

In this section, we are going to demonstrate the steps involved in configuring the Informatica Sorter Transformation with an example. For this example, we are going to use the below show data

Sorter Transformation in Informatica 0

Configure Sorter Transformation in Informatica

Before we start Informatica Sorter Transformation demo, First, connect to Informatica repository service. For this, provide the Informatica Admin Console credentials (Username and Password) and click on the Connect button

Sorter Transformation

Step 1: Creating Source Definition for Sorter Transformation in Informatica

Once you connected successfully, Please navigate to Source Analyzer to set our Sources. In this Sorter example, we are using the already created SQL table (Fact Internet Sales) as our source definition. Please refer Database Source in Informatica to know the steps involved in creating source definition

Sorter Transformation in Informatica 1

Step 2: Create Mapping for Sorter Transformation in Informatica

To create a new mapping for sorter, Please navigate to the Mappings menu in Menu Bar and select the Create.. option. Here, you have to write a unique name for this Mapping and click the OK button.

TIP: Please refer Informatica Mapping article to understand the steps involved in creating Mapping.

Sorter Transformation in Informatica 3

Next, Drag and drop the [Fact Internet Sales] source definition from Sources folder to the mapping designer. Once you drag the source, the PowerCenter designer will automatically create the default transformation called the source qualifier.

Step 2(a): Creating Sorter Transformation in Informatica

To create a sorter transformation in Informatica, Please navigate to the Transformation menu in Menu Bar and select the Create.. option.

Sorter Transformation in Informatica 4

It opens a Create Transformation window, as shown below.

Sorter Transformation in Informatica 5

Please click on the arrow to select the required transformation from the drop-down list. Let us choose the Informatica Sorter transformation

Sorter Transformation in Informatica 6

Next, Please specify the unique name for this Sorter transformation and click on Create button

Sorter Transformation in Informatica 7

Once you click on the Create button, the Informatica Sorter transformation will be added to the mapping designer. In order to perform sorting, transformation requires some data so, we have to connect it with Source definition.

Sorter Transformation in Informatica 8Informatica PowerCenter Designer provides multiple ways to connect the source qualifier with the newly created Sorter transformation in Informatica. For this example, we are right clicking on the empty space and selecting the Autolink.. option from that context menu.

NOTE: Informatica Mapping designer allows us to delete the wrong mapping by selecting the link and deleting it.

Sorter Transformation in Informatica 9

From the above screenshot, you can observe that, we successfully connected the source qualifier to Informatica sorter transformation.

Double click on the Informatica Sorter transformation to configure the sort properties. Below window will show you the list of available properties in the Transformation tab:

  • Select Transformation: By default, it will select the transformation you clicked on.
  • Rename: This button will help you to rename the sorter transformation to a more meaningful name.
  • Make Reusable: If you check mark this option then, this transformation will become reusable transformation.
  • Description: Please provide the valid description about this transformation.
Sorter Transformation in Informatica 10

Below screenshot will show you the list of available options in the Ports tab of a Informatica Sorter Transformation:.

  • Port Name: List of available column names. By clicking the New column button you can add new columns and by clicking the scissors button you can delete the unwanted columns.
  • I: Columns that are check marked under this section are the Sorter transformation Input columns.
  • O: Columns that are check marked under this section are the Sorter transformation Output columns. If you unchecked any column then, that column will not be available to load in the target table.
  • Key: Please checkmark the Column(s) that you want to use as Sort column. For example, If you want to sort the data by Unit Price and Order Quantity then you have to checkmark both of them.
  • Direction: Here we have to select the Sort direction. This Informatica Sorter Transformation provides two options: Ascending order (A to Z) and Descending Order(Z to A)
Sorter Transformation in Informatica 11

To understand the Sorter Transformation in informatica, we are sorting one column with Ascending order and another with Descending order. From the below screenshot you can observe that, we are sorting the [Sales Amount] in Descending Order

Sorter Transformation in Informatica 12

Next, we are sorting the [Freight] in Ascending order. It means,

  • First data is sorted by the [Sales Amount] in Descending Order and then
  • Second, data will be sorted by the [Freight] in Ascending order.
Sorter Transformation in Informatica 13

Click OK to finish configuring the Sorter Transformation in Informatica.

Step 2(b): Target Definition for Sorted Transformation in Informatica

First, Drag and drop the [Sorter Transformation in Informatica] target definition from Targets folder to the mapping designer. Next, We have to connect the Sorter Transformation with the target definition. Please use the Autolink.. option to connect them.

TIP: Please refer to Create Target Table in Informatica article to understand importing the target definition from the SQL Database.

Sorter Transformation in Informatica 14

Before we close the Mapping, Let us validate the Informatica Sorter Transformation mapping by going to Mapping Menu bar and selecting the Validate option.

Step 3: Creating a Workflow for Sorter Transformation in Informatica

Once we finish creating the Mapping we have to create the workflow for it. Informatica PowerCenter Workflow manager provides two approaches to create a workflow.

In this Informatica Sorter Transformation example, we created the Workflow manually. We strictly recommend to refer Informatica Workflow article to understand the steps involved in creating Workflow manually. Once we created the workflow, our next step is to create a session.

Step 3(a): Creating an Informatica Sorter Transformation Session

There are two types of sessions in informatica:

For this Sorted Transformation in Informatica example, we are going to create Non-reusable Session. In order to create Non-reusable Session in informatica, Please navigate to Tasks Menu and select the Create option to open the Create Task window. Here you have to select the Session as Task type (default) and enter a unique name for the session.

Once you click on the Create button, a new window called Mappings will be opened. Here we have to select the mapping you want to associate with this session. From the below screenshot you can observe that, we are selecting the mapping that we created earlier (in Step 2).

Sorter Transformation in Informatica 15

Although we have to configure sources, Target and some common properties, we are explaining only two properties. We strictly recommend to visit Session in Informatica article to understand the remaining properties.

From the below screenshot you can observe that, we changed the Target Load Type option from Bulk to Normal mode and check marked the Truncate target table option to truncate the existing data from the destination table.

Sorter Transformation in Informatica 16

From the below screenshot you can observe that, Our informatica workflow is a valid one. Now, Let us start the Informatica Sorter Transformation Workflow by navigating to Workflows menu and selecting the Start Workflow option.

Sorter Transformation in Informatica 17

Once you select the Start Workflow option, Informatica PowerCenter Workflow monitor will be opened to monitor the workflow. From the below screenshot you can observe that, our Sorted Transformation workflow is executed without any errors.

Sorter Transformation in Informatica 18

Let us open the SQL Server Management Studio to check whether we successfully transferred the sort data from Adventure Works DW to the Informatica target database. Please refer SQL ORDER BY Statement article in SQL Server Tutorial.

Sorter Transformation in Informatica 19

Comments are closed.