使用 Talend 将多行合并为 1 行和多列

时间:2021-07-30 17:31:17

标签: multiple-columns rows talend

输入:

enter image description here

我想要的输出:

enter image description here

所以我有 3 行和 1 列,它总是在 Excel 文件的同一列中。

我总是有 3 列,我想将其转换为 1 行和 3 列。

我该怎么做?

谢谢!

1 个答案:

答案 0 :(得分:1)

您可以使用简单的 tMap 和 tAggregaterow 来实现这一点。你必须在你的输出上得到一个固定的模式,但据我所知,情况就是这样。 (名字/小时/姓氏)

enter image description here

enter image description here tMap :对于每个输出字段,如果列 A 与输出列的名称匹配,则放置列 B 的值。否则为空。

enter image description here

tAggregate 使用 'max' 操作将数据压缩到一行。

相关问题