Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Bharath12
Contributor III
Contributor III

How to combine/concatenate 3 string fields and create a new field

Hi All,

 

I am new to Talend and I have requirement to create a new field in output easticsearch database.

 

My input has first name, lastname and middlename which are of string type.

 

And I want to concatenate these 3 fields and generate a new field in

output easticsearch database.

 

I want to get output like "fullname" : { "given" : "<source.firstname>", "middle" : "<source.middle>", "family" : "<source.lastname>" }

 

can some one help me how to do that in TMAP

 

thanks in advance.

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello 

 

(row5.FirstName + " " +row5.MiddleName + " "+row5.LastName) .replaceAll("null","")

 

This is the bettter way to concatinate, Please give kudos and accept solution if it works

View solution in original post

3 Replies
Anonymous
Not applicable

Hello 

 

(row5.FirstName + " " +row5.MiddleName + " "+row5.LastName) .replaceAll("null","")

 

This is the bettter way to concatinate, Please give kudos and accept solution if it works

akumar2301
Specialist II
Specialist II

if you need output string with double quotes

 

"\"fullname\" : {\"given\" : \"" 

+ row1.firstname +

"\", \"middle\" : \""

+  row1.middle +

"\", \"family\" : \""

+ row1.lastname +

"\" }"

Anonymous
Not applicable

Thank you @rchinta