[resolved] How to map Multi-occurence attribute on tMap

One Star

[resolved] How to map Multi-occurence attribute on tMap

Hi,
I have a problem to configure a data integration job to my MDM hub (image of the job bellow).
In fact, I have a multi-occurence attribute on my MDM model and the problem is that the attribute is mapped as a simple attribute in my tMDMOutput entity (see image bellow).
The occurences of my attribute in the csv file are separated by ~.
I've tried the simple mapping so all the attributes are integrated to a unique occurence !!
I've used a routine based on stringTokenizer that return a list of string elements (the occurences) but it just separate the attributes and integrate them as a list to one simple occurence.
I would like to integrate the occurences as occurences of the attribute but can't issue it out !
Thank's in advance for help.

Accepted Solutions
Highlighted
One Star

Re: [resolved] How to map Multi-occurence attribute on tMap

Just issue out the problem.
Maybe it'll serve somebody ! so : I had to change the MDMOutput component (the XML Shema).
Because I have 3 Firstname cols in my csv (for the 3 occurences of my FirstName attribute) so I added 2 others sub element to my xml tree in Output, link them to the correcponding columns and name them FirstName (like in the image).
Voilà.

All Replies
Employee

Re: [resolved] How to map Multi-occurence attribute on tMap

Hi petresh,
You can simply set the field separator to '~' in your tFileInputDelimited, instead of ';', which is the default and why you get all your columns into the same attribute.
Regards,
Cyril.
One Star

Re: [resolved] How to map Multi-occurence attribute on tMap

Hi Cyril, thank's for your quick reply.
Here's my CSV File (image) separated as default by ';'
I used the '~' to separate the occurrences of the firstname attribute.
You can see on the image the result of integration in a simple field ( Florian~Armel~De ) Or I want them in 3 separated occurences of firstname as on my model the firstname can have till 3 occurences (see the image for the wanted result).
Thank's in advance.
Petresh
Employee

Re: [resolved] How to map Multi-occurence attribute on tMap

Understood.
Check-out tNormalize then.
Regards,
Cyril.
One Star

Re: [resolved] How to map Multi-occurence attribute on tMap

Nope, It's not exactly what I am looking for.
The tNormalize work fine to separate the occurences but in 3 new rows, at integration only the last row is conserved.
So From the 3 occurences of my firstName I only get the last one recorded.
See the images bellow of the new job and the result.
Maybe I missed something, sorry I am novice !!
Petresh
Highlighted
One Star

Re: [resolved] How to map Multi-occurence attribute on tMap

Just issue out the problem.
Maybe it'll serve somebody ! so : I had to change the MDMOutput component (the XML Shema).
Because I have 3 Firstname cols in my csv (for the 3 occurences of my FirstName attribute) so I added 2 others sub element to my xml tree in Output, link them to the correcponding columns and name them FirstName (like in the image).
Voilà.

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.