Export multple values in one field

Six Stars ars
Six Stars

Export multple values in one field

Hi all,

 

I need to export a csv file that will consists of 4 fields, separered by "|" character.

But one of them must be contain multiple values, separated by ";" character.

 

For example, there will be 4 fields : FieldA, FieldB, FieldC, FieldD

I need to export records like this format:

|1|AAA|COMPONENT1;COMPONENT2;COMPONENT3|USER1

|2|BBB|COMPONENT1;COMPONENT2|USER2

|3|CCC|COMPONENT1;COMPONENT2;COMPONENT3;COMPONENT4;|USER3

|4|DDD|COMPONENT1;|USER4

 

Is there any way (component or code) to do that ? To "combine" multiple values into one field (FieldC) ?

 

Thank you in advance,

 

Ars 


Accepted Solutions
Community Manager

Re: Export multple values in one field

Take a look at the tDenormalize component. It is described here: https://help.talend.com/reader/g8zdjVE7fWNUh3u4ztO6Dw/8qYPQFzXFh_ZnLulsMYOww

Seven Stars

Re: Export multple values in one field

HI,

 

Input

1|AAA|COMPONENT1|USER1
1|AAA|COMPONENT2|USER1
1|AAA|COMPONENT3|USER1
2|BBB|COMPONENT1|USER2
2|BBB|COMPONENT2|USER2

 

output

col1|col2|col3|col4 

1 |AAA |COMPONENT1;COMPONENT2;COMPONENT3|USER1
2 |BBB |COMPONENT1;COMPONENT2 |USER2

 

One.JPGtwo.JPG

 

 


All Replies
Community Manager

Re: Export multple values in one field

Take a look at the tDenormalize component. It is described here: https://help.talend.com/reader/g8zdjVE7fWNUh3u4ztO6Dw/8qYPQFzXFh_ZnLulsMYOww

Six Stars ars
Six Stars

Re: Export multple values in one field

Dear rhall_2_0,

 

Yes !!! This is it !!!

 

Perfect - thank you very much for your reply.

 

Regards,

 

Ars

Seven Stars

Re: Export multple values in one field

HI,

 

Input

1|AAA|COMPONENT1|USER1
1|AAA|COMPONENT2|USER1
1|AAA|COMPONENT3|USER1
2|BBB|COMPONENT1|USER2
2|BBB|COMPONENT2|USER2

 

output

col1|col2|col3|col4 

1 |AAA |COMPONENT1;COMPONENT2;COMPONENT3|USER1
2 |BBB |COMPONENT1;COMPONENT2 |USER2

 

One.JPGtwo.JPG

 

 

Community Manager

Re: Export multple values in one field

No problem. However you appear to have accepted your thank you note as the accepted solution.

Six Stars ars
Six Stars

Re: Export multple values in one field

Sorry, my mistake !!!

 

I fixed it Smiley Happy

 

Regards,

Six Stars ars
Six Stars

Re: Export multple values in one field

Dear sachinddhake,

 

Thank you for your contribution - especially because you spent time in order to reproduce my requirement !!!

 

Best regards,

 

Ars

 

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads