Question

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?

Was it helpful?

Solution

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

Aggregator transformation!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top