[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
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.
Highlighted
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
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à.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch