如何在TALEND中将一行拆分为不同的行 [英] How to split one row in different rows in TALEND

查看:104
本文介绍了如何在TALEND中将一行拆分为不同的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助将一行从旧数据库迁移到新数据库中的多行。

I need help to migrate one row from old DB to multiple rows in my New DB.

我有一个数据,例如:

OID       CUSTOMER_NAME     DOB            ADDRESS
1          XYZ              03/04/1987    ABC

在我的新数据库中,我将数据存储在键值对中,例如:

In my new DB i am storing data in KEY VALUE pair like:

OID      KEY            VALUE
1      CUSTOMER_NAME    XYZ
1      DOB             03/04/1987
1      ADDRESS        ABC

请有人帮我使用TALEND工具执行此操作。

Someone please help me how to do this using TALEND tool.

推荐答案

您可以使用链接的tMap多个输出与此处的一种可能解决方案相同的输出。但这不是动态的。为什么要在源选择查询本身中将单行拆分为多行?

you can use tMap multiple output linked to same output as one possible solution here. But it is not dynamic. why can you split the single row into multiple rows in source select query itself?

如果要使用此tmap选项,请参见下文

if you want to use this tmap option see below

tOracleInput(anyotherinput)-> tMap-> toutput / tlogrow

tOracleInput(anyotherinput)-->tMap-->toutput/tlogrow

将此行作为tmap组件的输入,并在tmap中创建一个输出组说出_1。
现在在此out_1中,从输入中拖动并链接OID和CUSTOMER_NAME列。
现在在此tmap中创建另一个输出组out_02,当出现添加输出对话框时,
选择 create join table from,然后在下拉列表中选择out_1组,这样我们out_02组的输出行也将进入out_01组。
因此,我们的tmap将只有一个输出组out_01,其中包含来自out_01和out_02的行。现在在out_02中,拖动并链接OID和DBO列。
同样对out_03重复此操作,并链接OID和ADDRESS列。

Take this row as input to tmap component and in tmap create one output group say out_1. Now in this out_1 drag and link OID and CUSTOMER_NAME columns from input. Now create another output group out_02 in this tmap and when "add a output" dialog comes select "create join table from" and in the dropdown select out_1 group, so that our output rows from this out_02 group will also go to out_01 group. So our tmap will have only one output group out_01 containing rows from both out_01 and out_02. now in out_02 drag and link OID and DBO columns. similarly repeat it for out_03 and link OID and ADDRESS column..

这篇关于如何在TALEND中将一行拆分为不同的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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