Four Stars

Talend Data Mapper – Concatenation

Hello,

 

Can anyone help us to find a solution in the Mapping perspective for below scenario:
1) We have a column A whose value definition is using aggregate concat (Agconcat) and separated by delimiter ;
Ex of output of column A: P03;P10;P25

 

We now have to concatenate each value separately with an underscore together with another column B, thus the output should be as follows (expected result):
P03_columnB;P10_columnB;P25_columnB

We have tried using functions concat and agconcat together but it is not working and we are not getting the expected result.

 

Thanking you in advance for your help.

 

Best Regards,
Karunesh

 

 

  • Data Integration
7 REPLIES
Seven Stars

Re: Talend Data Mapper – Concatenation

Hi,

Here is a suggestion (I don't see how to do it in one step).

You will have to handle two maps:

1-The first one will have the same structure as input and output. You will concatenate input fields A and B in your output A column.

2-The second one will run AgConcat function

 

In properties of the first map, enter the second map as "Next map".

 

Eric

Four Stars

Re: Talend Data Mapper – Concatenation

Hello Eric,

 

Thanks for your quick reply.

We have proceeded with same logic you mentioned above but now we are getting the result in three separate lines as follows:

P03_columnB;P10_columnB;P25_columnB

P03_columnB;P10_columnB;P25_columnB

P03_columnB;P10_columnB;P25_columnB

 

Can you please advise whether it’s normal as we think that we should have the output only in one line?

P03_columnB;P10_columnB;P25_columnB

 

Best Regards,

Karunesh

Seven Stars

Re: Talend Data Mapper – Concatenation

Hi,

 

No, you could get a single line.

 

Could you send screenshots of your structures and AgConcat function ?

 

What is your Talend version ? If it is not above 6.2, could you upload your map (Mine is 6.2.1 so I won't be able to read your map if it is beyond 6.2) ?

 

Eric

Four Stars

Re: Talend Data Mapper – Concatenation

Hello Eric,

 

Please note that we are using Talend 6.3.1 and find attached requested screenshot

 

Best Regards,

Karunesh

Four Stars

Re: Talend Data Mapper – Concatenation

  1. First Map – Concat function
Four Stars

Re: Talend Data Mapper – Concatenation

2. Second Map – Agconcat function

Seven Stars

Re: Talend Data Mapper – Concatenation

Could you upload your XML input file and the CSV expected file ?

 

How many CSV lines should you get per XML input file ? What is the XML loop element ?