Mapping: Convert Rows To Columns

Mapping: Convert Rows To Columns

Posted by: Informatica Platform

This template describes a mapping in Informatica PowerCenter which helps to pivot data from multiple rows into columns in a single row.

Overview

This solution describes how to pivot data from the multiple rows into columns in a single row. Source
CUSTOMER_ID PRODUCT_CATEGORY SALES_AMT
CUST_1CAT_A2000
CUST_1CAT_B3000
CUST_1CAT_C4000
CUST_2CAT_A8000
CUST_2CAT_C7000
Target
CUSTOMER_ID CATEGORY_A_AMT CATEGORY_B_AMT CATEGORY_C_AMT
CUST_1200030004000
CUST_280007000
There are a few different methods of building one record out of several. Often this can be accomplished by using an aggregator. Alternatively, an Expression variable logic can be utilized. This mapping template illustrates all the methods.

Features

Using Expression port variables allows for great flexibility on the condition on which the final record can be built.

  • Informatica PowerCenter 9.1 and above.

Resources

Support