Concatenate Input Columns in TMap

Four Stars

Concatenate Input Columns in TMap

Hello,

 

I am trying to concatenate two excel input columns into one on Talend using Tmap, but the output is splitting into multiple columns because the data in columns is separated by a comma. Please see the below example:

Expected Output
Col1Col2OutputCol
GRETCHEN, CSELITE FIRE SERVICE, INC. GRETCHEN, CS ELITE FIRE SERVICE, INC.

 

Generated Output 
GRETCHEN, CSELITE FIRE SERVICE, INC. GRETCHENCS ELITE FIRE SERVICEINC

 

I am using row1.Col1 + row2.Col2 in Tmap expression.

 

Thanks

Sumithra


Accepted Solutions
Eleven Stars

Re: Concatenate Input Columns in TMap

in your tfileOutputDelimited in Advenced setting add CSV option

Francois Denis

Tag as "solved" for others! Kudos to thanks!


All Replies
Forteen Stars TRF
Forteen Stars

Re: Concatenate Input Columns in TMap

What kind of output do you expect?

Can you share you tMap + schemas?


TRF
Four Stars

Re: Concatenate Input Columns in TMap

Hi,

 

Thanks for Replying. My talend job looks like this.talendjob.JPG

Forteen Stars TRF
Forteen Stars

Re: Concatenate Input Columns in TMap

For tFileOutputDelimited, change the field separator from ',' to something else like ";"


TRF
Four Stars

Re: Concatenate Input Columns in TMap

Hi TRF,

 

But I would need the output to be generated as a csv file which will be separated by comma. Is there any other way we can approach?

 

Sumithra

Forteen Stars TRF
Forteen Stars

Re: Concatenate Input Columns in TMap

If you want field separator as comma and you also have commas into the field value, then you have to enclose fields between "" or any character you want.


TRF
Eleven Stars

Re: Concatenate Input Columns in TMap

in your tfileOutputDelimited in Advenced setting add CSV option

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Twelve Stars

Re: Concatenate Input Columns in TMap

@s_kulkarni0317,please find the below are you looking for?

 

 

 

Untitled.pngJobUntitled.pngOutputUntitled.pngtmapUntitled.pngtFileOutputDelimited settings

Manohar B
Four Stars

Re: Concatenate Input Columns in TMap

Thanks aton fdenis.. It worked.... Smiley Happy

Four Stars

Re: Concatenate Input Columns in TMap

Hello Fednis,

 

So what should be the settings after checking csv option. It has escape characters and text enclosure. I just need a csv files with comma separated values. 

 

Thanks

Sumithra

Eleven Stars

Re: Concatenate Input Columns in TMap

it's the limitation of csv. if you did not want csv option the only way is to allow separator only on the last field.
that's why you can choose your separator!
that's why there is others files format!

Francois Denis

Tag as "solved" for others! Kudos to thanks!