Need
When implementing an application in Semarchy xDM, it is common to face integration constraints. In some cases, external applications already reference parent records using a UUID (MDM ID) and cannot be modified to send the parent’s primary key.
However, to correctly establish the parent-child relationship in xDM, the platform typically requires the parent record’s primary key. The challenge is therefore: how can we create a child record and link it to its parent using only the parent’s UUID, without changing the existing application logic?
Summarized Solution
You can use the Lookup Enricher plugin to automatically retrieve and populate the required parent key fields during data load.
The process works as follows:
- The child record contains only the parent’s UUID.
- A Lookup Enricher maps this UUID to the correct parent record.
- The enricher populates the necessary foreign key fields (FP/FS columns) in the source table.
- The relationship is successfully created without requiring application changes.
Important: the Lookup Enricher requires lookup values to be of type string, so the UUID must be cast to a string format if necessary.
Documentation reference: https://www.semarchy.com/doc/semarchy-xdm/xdm/latest/Plugins/lookup-enricher.html
Detailed Solution
In a standard parent-child relationship in xDM:
- The child record stores foreign key columns referencing the parent’s primary key.
- During load, these foreign key fields must be populated to create the relationship.
In this scenario:
- The external system only provides the parent UUID (MDM ID).
- The primary key is not available.
- The external application cannot be modified.
2. Approach Using the Lookup Enricher
The Lookup Enricher plugin can dynamically retrieve data from an existing table and enrich incoming records before integration.
Step 1 - Ensure UUID is a string
The Lookup Enricher requires matching fields to be of type string.
If your UUID is not already a string:
- Cast it to a string in the source mapping or transformation layer.
- Ensure consistent formatting between source and target.
Step 2 - Configure the lookup
Configure the Lookup Enricher to:
- Use the UUID from the child source record as the lookup value.
- Query the parent golden or master table.
- Retrieve the parent’s primary key (FP/FS columns).
- Map the returned parent primary key into the child’s:
- Foreign PublisherID (FP) column
- Foreign SourceID (FS) column
Here is an example:
