Combined Keys in MDM

Not applicable

Combined Keys in MDM

Hi Guys,
Hope all is well.
In the MDM back end where you great the front end(Model)
You get an UUID or you can use your own key.
But now we need to compose a key from 2 Elements and was wondering how to do that?
For example
We have code and salesorg.
Code = 01
Salesorg = 1000
These 2 elements forms one key?
Thank you,
One Star

Re: Combined Keys in MDM

Hello, Jannus,
I managed to do that on Talend MDM Studio 4.2.2.
The resulting XML is something like e.g:
<xsd:element name="Region" type="RegionType">
<xsd:appinfo source="X_ForeignKey">Region/id</xsd:appinfo>
<xsd:appinfo source="X_ForeignKey_Filter">Region/id$$Contains$$$$#Region/name$$Contains$$$$#</xsd:appinfo>
<xsd:appinfo source="X_Retrieve_FKinfos">false</xsd:appinfo>
<xsd:unique name="Region">
<xsd:selector xpath="."/>
<xsd:field xpath="name"/>
<xsd:field xpath="id"/>
Best regards,
Not applicable

Re: Combined Keys in MDM

HI Gilf,
Thank you for the quick response.
I copied your code and tried it but was not working.
So with this code it can have 2 keys instead of just the one key?
Thank you,

Re: Combined Keys in MDM

Hi Jannus,
To setup a composite key on an entity :
1. Right-click on the Keys of the entity
2. Select 'New Field'
3. Choose the field you want to add
This will enable you to set the composite key.
But, to ease the use of the entity, I suggest that you setup a single field with a generated key to identify the entities if it's possible.
Hope that helps,
One Star

Re: Combined Keys in MDM

I have an entity with composite key that is made up of a couple of its regular elements and a foreign key. I get the error message "Key field cannot be a foreign key element." What am I doing wrong?

Re: Combined Keys in MDM

This validation message informs you MDM does'nt support having a FK element as part of the ID of your entity (i.e values that are used to define an entity ID must be defined within this entity).

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

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



Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.