#1 2008-05-13 11:13:40

yanl
Member
Registered: 2008-02-29
Posts: 16

How can I combine columns?

Hi,

I have several shemas with two columns, one columns is the id, the other one is the information concerned to the id. Now, I want to combine these shemas as one shema with one column of id and other columns with information concerned. How can I do?

Thank you!

Offline

#2 2008-05-13 12:03:54

shong
Talend team
Registered: 2007-08-29
Posts: 10357
Website

Re: How can I combine columns?

Hello

Does the tUnite compoent fit your need?
Please show detailed information about your data source? file or database?

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2008-05-13 14:17:43

yanl
Member
Registered: 2008-02-29
Posts: 16

Re: How can I combine columns?

Hi,

For exemples, I want to get the result like this:

file1                    file 2                   file3

ID;INFOR1        ID;INFOR2       ID;INFOR3
1;dd                    1;11                   1;dfff
2;df                     2;22                   2;uyyy
3;cc                    3;33                   3;hnnn
4;wa                    4;44                   4;hppp
5;fe                     5;55                   5;fooo

Now I want to get a unique file:
ID;INFOR1;INFOR2;INFOR3
1;dd;11;dfff
2;df;22;uyyy
3;cc;33;hnnn
4;wa;44;hppp
5;fe;55;fooo

How can I do?
thanks

Offline

#4 2008-05-13 14:54:09

Theo
Member
Registered: 2008-03-26
Posts: 71

Re: How can I combine columns?

Hello,

I would do it this way:

- Use three tFileInputDelimited (one for each file), define the schemas as "ID" and "INFO"
- Use a tMap and connect it with all file inputs. Set up the schema and expressions like in the screenshot below

I hope this was helpful for you.

Regards,
Theo

Edit: The expressions looking like ro... in the screenshot are row1.ID, row1.INFO, row2.INFO and row3.INFO


Uploaded Images

Last edited by Theo (2008-05-13 15:17:00)

Offline

#5 2008-05-13 16:41:58

yanl
Member
Registered: 2008-02-29
Posts: 16

Re: How can I combine columns?

Theo wrote:

I hope this was helpful for you.

Yes it does help me, Thanks a lot Theo!

Offline

Board footer

Powered by FluxBB