The Normalizer Transformation in Informatica is an Active, and Connected transformation. This transformation is used to normalize the denormalized data. Or you can simply say, divide single in a table to multiple rows. For this example, we are going to use the below show data (Denormalized Source table)
And the destination tables are:
Normalizer Transformation in Informatica Example
Before we start configuring the Informatica Normalizer Transformation, First let me connect with the Informatica repository service. In order to do so, we have to provide the Informatica Admin Console credentials. So, Please provide the appropriate Username and Password, and click the Connect button.
TIP: Here you have to provide the Admin Username and password that you specified while installing the Informatica Server.
Step 1: Create Source Definition for Informatica Normalizer Transformation
Once you connected successfully, Please navigate to Source Analyzer and define your Sources. In this example, we are using Denormalized Source table from SQL Server database as our source definitions. Please refer Database Source in Informatica to understand the steps involved in creating source definition
Step 2: Create Target Definition for Informatica Normalizer Transformation
Please navigate to Target Designer and define the Target. In this example, we are using the already created SQL tables (Normalized prosecutors and Normalized Sales) as our target definition. Please refer Create Informatica Target table using Source Definition to understand the steps involved in creating target definition
Step 3: Create a Mapping for Informatica Normalizer Transformation
To create a new mapping, Please navigate to Mappings menu in Menu Bar, and select the Create.. option.
This will open the Mapping Name window to write unique name for this mapping. Let me write m_normalizer and click OK button.
TIP : Please refer Informatica Mapping article to understand the procedure to create Mapping
Drag and drop the DenormalizedSource source definitions from Sources folder to the mapping designer. Once you drag the source, Power Center designer will automatically create the source qualifier for you. I suggest you to refer Source Qualifier Transformation article.
Next, let me create Normalizer transformation in informatica. To do so, Please navigate to Transformation menu in Menu Bar. Next, select the Create.. option
This will open the Create Transformation window as shown below. Please select the Normalizer from drop down list and provide the unique name (nrm_ProductSale) for this transformation and click on Create button
Now you can see the Normalizer Transformation in your mapping area. Remember, you can’t simply drag and drop fields from Source Qualifier to Normalizer. So, we have to explicitly create the fields inside a Normalizer transformation.
Double click on the Normalizer transformation to edit the Transformation. Next, go to the Normalizer tab, and use the New Field option to add new fields.
From the below screenshot you can observe that, We added 7 new columns using the New Port button. Remember, both the Data type, and Precision should match with the input and output fields.
Next, we selected the Year column and clicked the Right Shift button beside the Level.
This will create a Level field, and shift the Year column to Level 2.
Similarly, we added the Sales, and Orders columns to Level 2. In our Source table Year, Orders, and Sales are repeating for 4 times (2014, 2015, 2016, and 2017). This is why we assigned 4 to Occurs. If this is not the case then use approprate number.
Now you can the Number of Input and Output ports that are automatically created by the Normalizer.
You can see the Normalizer Transformation will all the required Filed name. Now we have to connect the Input and Outputs to Normalizer transformation
First we connected the Source Qualifier with the Normalizer
Next, Drag and drop the target definition from Targets folder to the mapping designer
Connect the Output fields from Normalizer transformation to the target definitions. Please use the Autolink.. option to connect them. Before we close the Mapping, Let us validate the mapping by going to Mapping Menu bar and selecting the Validate option.
Step 4: Create a Workflow for Normalizer Transformation in Informatica
After we finish creating the Mapping, we have to create a workflow for it. Power Center Workflow manager provides two approaches to create workflow.
In this example we will create the Workflow manually. To do so, Please navigate to Workflows Menu and select the Create option.
This will open Create Workflow window as shown below. Please provide the unique name (wf_NormalizerTrans) and leave the default settings.
Once we created the workflow, our next step is to create session task for our mapping.
Step 4(a): Create a Session for Normalizer Transformation in Informatica
There are two types of sessions in informatica:
For this example we will create a Non-reusable Session. In order to create, Please navigate to Tasks Menu and select the Create option as shown below.
Please provide a unique name for this session. Here, we are naming it as s_NormalizerTran. Once you click on the Create button, a new window called Mappings will be opened. Here, we are selecting the m_normalizer
Please link the Start Task and the session task.
Double click on the Session task will open the Edit Tasks window. Within Properties Tab
$Source connection value: This property will store the relational source information in $Source variable. So, click on the Arrow we marked below, and select the SQL Tutorial as the source information.
$Target connection value: This property will store the relational target information in $Target variable. So, click on the Arrow we marked below, and select the SQL Test target as the Target information.
Within the mappings tab, we have to configure the Source, target Connections. First, let us configure the source connections by clicking on the SQ_DenormalizedSource source present in the Sources folder.
With in the Connections, click on the Arrow button beside the Relational type, and use the Connection variable that we created in our previous step i.e., $Source
Now, we have to configure the Target Connection. So, click on the NormalizedProducts present in the Targets folder. With in the Connections, click on the Arrow button beside the Relational type, and use the Connection variable $Target
Do the same for the NormalizedSales Target
Next, navigate to Workflows Menu and select the Validate option to validate the Workflow.
Now, Let me start the Workflow. To do so, navigate to Workflows menu, and select the Start Workflow option. Once you select the Start Workflow option, Informatica PowerCenter Workflow monitor will be opened to monitor the workflow.
Let us open the SQL Server Management Studio to check whether we successfully Normalized rhe data or not. First, look at the Normalized products table:
Let me show you the Normalized sales.
Thank You for visiting Our Blog