如何从Talend中的一行生成多行?

如何从Talend中的一行生成多行?,talend,talend-mdm,Talend,Talend Mdm,我有如下数据: Name | Address | FormName John | 123 Apple Drive | Form1 Form2 Form3 Dave| 133 Westchester Drive | Form1 Form2 Form3 如何根据FormName列将其转换为多行?因此,结果将是: Name | Address | FormName John | 123 Apple Drive | Form1 John | 123 Apple Drive | Form2 John |

我有如下数据:

Name | Address | FormName
John | 123 Apple Drive | Form1 Form2 Form3
Dave| 133 Westchester Drive | Form1 Form2 Form3
如何根据FormName列将其转换为多行?因此,结果将是:

Name | Address | FormName
John | 123 Apple Drive | Form1
John | 123 Apple Drive | Form2
John | 123 Apple Drive | Form3
Dave| 133 Westchester Drive | Form1 
Dave| 133 Westchester Drive | Form2
Dave| 133 Westchester Drive | Form3
因此,为每个人的每个表单创建了一行

我尝试使用tJavaFlex组件,但对于这个简单的任务来说,这似乎太复杂了。

一种方法:

数据集中每行的循环。 1.1。将姓名和地址放入当前人员字符串中

1.2。当您到达表单字段时,解析它

1.2.1。对于表单字段中的每个表单

1.2.2。打印添加到向量等。当前人员+当前表单-连接

这是一个非常基本的、直截了当的方法,所以首先,了解它是如何工作的,然后考虑其他方法——如果有的话。

< P>我发现T归一化确实做到了这一点!我将tNormalize连接到我的tMap,如下所示:

在tNormalize组件中,我指定了要在空格上分隔的内容和要规格化的列