Issue

When updating data targeting a master in Semarchy xDM via REST API, unintended updates may occur in linked SD (Staging Data) tables. 


Cause

This is due to internal mechanisms which recalculate fields such as FP_x (Foreign Publisher) and FS_x (Foreign Source) based on provided values and existing golden records (GD). The issue arises specifically when F_x field data are not explicitly set to null, leading to automatic recalculation and potential inconsistency with FP and FS values initially sent via API.

Solution

To manage data updates correctly and control recalculation behavior in Semarchy xDM, follow these detailed steps: 


1. Explicit Control of Field Values in API Request

When making an API call to update data, ensure to explicitly declare values for relational fields, particularly those like F_x which influence other calculated fields (FP_x and FS_x). An effective method to prevent unwanted recalculations is setting these relational fields to null if you don't want them to be auto-populated based on golden records. This approach keeps the original FP and FS values stable. Here's an example of setting this value within an API payload:


   {
     "action": "PERSIST_DATA",
     "persistRecords": {
       "entity": [
         {
           "id": "111222333",
           "FID_ABC": "FR1",
           "PublisherID": "DEF_007",
           "SourceID": "DEF_007_0003",
           "PublisherID_XYZ": "DEF_007",
           "SourceID_XYZ": "DEF_007_0001",
           "F_XYZ": null  // Setting relational field to null
         }
       ]
     }
   }
   


2. Understanding Recalculation and Certification Processes

In Semarchy xDM, when records are processed, especially during stage to golden conversions (certification), fields not provided in the input are 'checked out'—that is, calculated based on existing data relationships and rules defined in the model. If an initial value is not given or set to null, the system interprets it as needing to fetch or calculate the value. This includes fetching values from related golden records, affecting fields like FP_x and FS_x. 


3. Reviewing Master ID Survivorship Rules

It's crucial to review the "Master ID Survivorship Rules" if encountering issues with source ID or publisher ID during merge operations, as these settings define how xDM determines the winning record and associated IDs in multi-master environments. Adjustments here might be necessary to align with the specific business and integration requirements. 


4. Modify Data Integration Practices

If experiencing issues with unexpected data recalculations during API integrations, consider revising how data is presented and manipulated through the API—always specifying relational ids or setting them deliberately to null to manage their recalculation by xDM actively. Following this pattern ensures that external updates via API maintain consistency with the expected design and logic of the Semarchy xDM model, minimizing conflicts and unexpected behaviors during data consolidation and publishing phases.