top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to pivot row data using Informatica?

+1 vote
1,046 views

How can I pivot row data using Informatica PowerCenter Designer? Say, I have a source file called address.txt:

+---------+--------------+-----------------+
| ADDR_ID |     NAME     |     ADDRESS     |
+---------+--------------+-----------------+
|       1 | John Smith   | JohnsAddress1   |
|       1 | John Smith   | JohnsAddress2   |
|       2 | Adrian Smith | AdriansAddress1 |
|       2 | Adrian Smith | AdriansAddress2 |
+---------+--------------+-----------------+

I would like to Pivot this data like this:

+---------+--------------+-----------------+-----------------+
| ADDR_ID |     NAME     |    ADDRESS1     |    ADDRESS2     |
+---------+--------------+-----------------+-----------------+
|       1 | John Smith   | JohnsAddress1   | JohnsAddress2   |
|       2 | Adrian Smith | AdriansAddress1 | AdriansAddress2 |
+---------+--------------+-----------------+-----------------+

How can I do this in Informatica?

posted Mar 6, 2014 by Pooja Bhanout

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

If every person has two addresses, you can use the FIRST and LAST functions in an Aggregator transformation:
enter image description here

answer Mar 6, 2014 by Shweta Singh
Similar Questions
+1 vote

I have a source with multiple columns -
minA, maxA, minB, maxB, minC, maxC, minD, maxD

and I have 2 columns in target min values, max values. How can i put the min values of elements in min values of target and same with max?

...