如何使用Informatica透视行数据? [英] How to pivot row data using Informatica?

查看:93
本文介绍了如何使用Informatica透视行数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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 |
+---------+--------------+-----------------+-----------------+

如何在Informatica中做到这一点?

How can I do this in Informatica?

推荐答案

如果每个人都有两个地址,则可以在Aggregator转换中使用FIRSTLAST函数:

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

这篇关于如何使用Informatica透视行数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆