Sei sulla pagina 1di 9

Normalizer Transformation in Informatica, is a connected and active

Transformation which let you to normalize your data by receiving a row with information
scatters in multiple columns to multiple rows for each instance of column data. For example a
student have score for each subject scattered in 5 columns ,with the help of normalizer
transformation you can create multiple rows for each subject (Normalization of Database)
Properties of Normalizer Transformation:
Active /Passive: Normalizer Transformation is an Active transformation as it creates multiple rows for
each input row.
Connected/Unconnected Transformation: Normalizer Transformation is a connected Transformation.
Types of ports in Normalizer Transformation:
o Input : For reading input Data
o Output : For providing output Data
Note: Apart for user defined ports, Normalizer transformation also has below default port created.
GCID: The normalizer transformation generates this ID column for each set of multiple occurring
columns. It acts as the index for the instance of the multiple-occurring data. For example, if a column
occurs 3 times in a source record, the normalizer returns a value of 1, 2 or 3 in the generated column ID.
We can use this GCID to give some name to those values. We will see its more use in our example.
GK_VALUE: This port increases the sequence value for each input row. Unlike GCID, (which was
repeating itself for each set of group GK_VALUE keep on increasing with each source row processed.
Normalizer Transformation Components
When you configure a Normalizer transformation, define the following components:
Transformation tab: You can rename the transformation and add a description.
Properties tab: You can specify the tracing level.
Normalizer tab: Here you define the input/output port along with occurrence. For port which receive
values from multiple column we gives occurs greater than 1.
Ports tab: Once port under normalizer is created, you will see input and output port for normalizer. For
normalizer ports with occurs greater than 1, will see multiple input port but only one output port. ( see
example for more details)
NOTE: The Designer automatically creates input /output groups once normalizer ports are created under normalizer port.
Configuring Normalizer Transformation Ports:
You can create input ports by copying them from another transformation or by manually creating
them on the Group Ports tab. The Designer creates output ports by copying the following properties
from the input ports.
Port Details:
Port name: Add the name of the port.
Datatype, precision, and scale: Configure the datatype and set the precision and scale for each port.
Default Value: In case port data is null, you can define its default value.
Configuring Normalizer Transformation Properties:
Modify the Normalizer Transformation properties by clicking on the Properties tab.
Property Description
Reset
At the end of a session, resets the value sequence for each generated key value to the value it was
before the session.
Restart
Starts the generated key sequence at 1. Each time you run a session, the key sequence value starts at
1 and overrides the sequence value on the Ports tab.
Tracing
Level
Amount of detail displayed in the session log for this transformation. The options are Terse,
Normal, Verbose Data, and Verbose Initialization.














Problem Statement:
Create a mapping to populate different type of properties (example job, salary, Hire date) in a
separate row for each employee with the help of Normalizer Transformation.
Source Data:
EMP Table Data:
EMPNO ENAME JOB HIREDATE SAL COMM DEPT
4 HOOVER SALES I 4/2/1990 27000

5 LINCOLN TECH 11/2/1997 22500 1400 4
8 GRANT ENGINEER 23/5/1984 32000

5
9 JACKSON CEO 1/1/1990 75000

4
10 FILLMORE MANAGER 8/9/1994 56000

2
14 ROOSEVELT CPA 16/4/1990 35000

1

Target Data:
EMP_DETAILS Data:
EMPNO ENAME PROPERTY VALUE GK_VALUE GCID_VALUE
4 HOOVER JOB SALES I 1 1
4 HOOVER HIRE_DATE 4/2/1990 2 2
4 HOOVER SALERY 27000 3 3
5 LINCOLN JOB TECH 4 1
5 LINCOLN HIRE_DATE 11/2/1997 5 2
5 LINCOLN SALERY 22500 6 3
8 GRANT JOB ENGINEER 7 1
8 GRANT HIRE_DATE 23/5/1984 8 2
8 GRANT SALERY 32000 9 3
9 JACKSON JOB CEO 10 1
9 JACKSON HIRE_DATE 1/1/1990 11 2
9 JACKSON SALERY 75000 12 3
10 FILLMORE JOB MANAGER 13 1
10 FILLMORE HIRE_DATE 8/9/1994 14 2
10 FILLMORE SALERY 56000 15 3
14 ROOSEVELT JOB CPA 16 1
14 ROOSEVELT HIRE_DATE 16/4/1990 17 2
14 ROOSEVELT SALERY 35000 18 3
Solution:
Below are the steps to create full mapping.
Create a new mapping m_Normalizer_exampleby Go to toolbar -> click mapping-> Create
Drag Source (EMP) and Target (EMP_DETAILS) to the mapping.
Add Normalizer Transformation by Go to Toolbar->click Transformation -> Create. Select the
Normalizer transformation

Transformation Creation Step 1

Normalizer Transformation step 2.1
o You can also select Transformation by clicking function button on Informatica Designer

Normalizer Transformation Shortcut
Enter the name nm_EMP_Det and click Done.
Now create ports on the Normalizer Ports tab by double clicking on it.
Create Below port along with occurrence as given below.
o EMPNO (Occurs =1): As same EMP details will be populated for a group of EMP record.
o ENAME (Occurs =1): As same EMP details will be populated for a group of EMP record.
o VALUE (Occurs =3): As 3 different values (Job, Hiredate, and Sal) will be populated for an EMP
record.


Normalizer Transformation Step 5
Click the Transformation tab and configure transformation properties. ( change Tracing Level as per your
need)
With Reset option checked , sequence value of GK_VALUE will be reset during multiple run of session

Normalizer Transformation step 6
Click OK to close the nm_EMP_Det Normalization Transformation. Now we will have separate row for
each property value for an employee. But we need to add some expression to give the name to this
property value.
Add Expression, exp_EMP_DETAI LS (check here to learn how to add Expression Transformation).

Normalizer Transformation Step 7

Normalizer Transformation Step 8
Drag port (EMPNO, ENAME, VALUE, GCID_VALUE, and GK_VALUE) from exp_EMP_DETAILS
to the expression.
Add extra output port ,PROPERTY, with expression as below
DECODE (GCI D_VALUE, 1,JOB, 2,HIRE_DATE, 3,SAL)
To know whats value, these GCID_VALUE and GK_VALUE contain, you can add these column in
target table.
Note: This is just for learning purpose only. Usually it is not required to be populated in final Target
table
Now link all required port from exp_EMP_DETAILS to EMP_DETAILS Target.
Click on Mapping ( from tool bar) -> then Validate ( to validate the mapping)
Now save the mapping ( by clicking on Repository-> Save or you can also press Ctrl+S)
Generate the workflow and run it
Over all Mapping

Potrebbero piacerti anche