如何使用Informatica转动行数据?

时间:2013-10-10 11:11:28

标签: pivot data-warehouse etl informatica informatica-powercenter

如何使用Informatica PowerCenter Designer转动行数据?说,我有一个名为address.txt的源文件:

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

我想像这样透视这些数据:

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

我如何在Informatica中执行此操作?

1 个答案:

答案 0 :(得分:2)

如果每个人都有两个地址,您可以在FIRST转换中使用LASTAggregator函数:

Aggregator transformation