Four Stars

mapping 2 separate input fields to one field in data mapper

Hi

 

I am completely new to Talend, so please bear with me Smiley Happy

 

I have a simple input file in with 2 separate fields that should be mapped to the same field in the xsd. I am trying to achieve this using data mapper.  

 

This drawing illustrates what I am trying to achieve:

mapping.png

Since talend does not allow me to drag n drop to the same field I guess this requires some sort of looping, but I am yet to find out how to do this. 

 

Could you please provide me with some guidance on how exactly to do this? 

 

Thanks in advance

 

 

 

2 REPLIES
Twelve Stars

Re: mapping 2 separate input fields to one field in data mapper

@Wookie,in tmap you can concantenate.

 

row1.field+" "+row2.field

Manohar B
Four Stars

Re: mapping 2 separate input fields to one field in data mapper

Thanks for the suggestion, but I cannot imagine that will help since I am not trying to merge the fields by rather repeat/loop them. Let me clarify:

 

if you take a look at the output schema the field I am trying to map to is nested. It looks like this (simplified)

 

<organisationAssociations>
    <organisation>
             <v3:source_id>ENTRIES FROM ORG</v3:source_id>
      </organisation>
</staffOrganisationAssociation>

What I am trying to do is get this: 

 

<organisationAssociations>
    <organisation>
             <v3:source_id>ORG1</v3:source_id>
      </organisation>
</staffOrganisationAssociation>

<organisationAssociations>
    <organisation>
             <v3:source_id>ORG2</v3:source_id>
      </organisation>
</staffOrganisationAssociation>

 

Is that possible?