Mapping: Columns to rows using Normalizer

Mapping: Columns to rows using Normalizer

Posted by: Informatica Platform

PowerCenter example to pivot columns in a single row into multiple rows in the target using Normalizer Transformation.

Overview

Overview:Developers sometimes need to transform one source row into multiple target rows. For example, attributes that are stored in columns in one table or file may need to be broken into multiple records - one record per column attribute - upon being loaded into a data warehouse. Source
EMP_Name EMP_Year Transport House_Rent Food
Rachel Geller20002001500500
Chandler Bing20003001200300
Joey Frank20003001350350
Target
EMP_Name EMP_Year Expenses_Type Expenditure
Rachel Geller2000Transport200
Rachel Geller2000House_Rent1500
Rachel Geller2000Food500
Chandler Bing2000Transport300
Chandler Bing2000House_Rent1200
Chandler Bing2000Food300
Joey Frank2000Transport300
Joey Frank2000House_Rent1350
Joey Frank2000Food350
This mapping template demonstrates how to use a Normalizer transformation to split one source row into multiple target rows as shown above. Normalization is the process of organizing data. In database terms, this includes creating normalized tables and establishing relationships between those tables according to rules designed to both protect the data and make the database more flexible by eliminating redundancy and inconsistent dependencies.The Normalizer transformation normalizes records from VSAM and relational sources, allowing you to organize the data according to your own needs. A Normalizer transformation can appear anywhere in a data flow when you normalize a relational source. Use a Normalizer transformation instead of the Source Qualifier transformation when you normalize a VSAM source.The Normalizer transformation is primarily used with VSAM sources, which are often stored in a de-normalized format. The OCCURS statement in a COBOL file, for example, nests multiple records of information in a single row. Using the Normalizer transformation, you can break out repeated data within a record into separate records. For each new record it creates, the Normalizer transformation generates a unique identifier. You can use this key value to join the normalized records.Once you have created a Normalizer transformation in your mapping, you need to customize its properties. On the Normalizer transformation's "Normalizer" tab, you can set the port names, data types, key fields, precision and an Occurs value for each port passing through the Normalizer. Tips:
  • You can use a single Normalizer transformation to handle multiple levels of de-normalization in the same record. For example, a single record might contain two different detail record sets. Rather than using two Normalizer transformations to handle the two different detail record sets, you handle both normalizations in the same transformation.
  • If you have de-normalized data for which the Normalizer transformation has created key values, connect the ports representing the repeated data and the output port for the generated keys to a different portion of the data flow in the mapping. Ultimately, you may want to write these values to different targets.

Features

  • Informatica PowerCenter 9.1 and above.

Resources

Support