Four Stars ars
Four 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 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Eleven Stars

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

Rilhia Solutions
Six 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

 

 

6 REPLIES
Eleven Stars

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

Rilhia Solutions
Four Stars ars
Four 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

Six 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

 

 

Eleven Stars

Re: Export multple values in one field

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

Rilhia Solutions
Four Stars ars
Four Stars

Re: Export multple values in one field

Sorry, my mistake !!!

 

I fixed it Smiley Happy

 

Regards,

Four Stars ars
Four 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