DIXF – How to regenerate target entities

There is time when you add custom fields to staging table and they do not appear in your Target when you promote data from STAGING to TARGET. The reason the new fields do not appear in TARGET because it does not know there are new fields that we need to regenerate field mapping for the target.

There are 2 ways to do this, I’m going to show you both LONG WAY and SHORT WAY

LONG WAY

1. Go to the DIXF area page. Click on Target entities.

image

2. Find the entity in the list.

clip_image001[5]

3. Click on the “Modify target mapping” at the top:

image

4. Click on “Mapping Details”

image

5. Click on “Generate mapping”

clip_image001

6.  Answer “Yes” to prompt

image

7. You should see your new fields in the list

clip_image001[13]

SHORT WAY

Run either one of the 2 jobs below

This jobs run for all entities

static void regenerateDMFTargetMapping(Args _args)
{
    DMFTargetXMLToEntityMap     dmfTargetXMLToEntityMap;
    DMFEntity                   dmfEntity;
 
    // delete all target Mappings
    ttsBegin;
        delete_from dmfTargetXMLToEntityMap;
    ttsCommit;
 
    // Regenerate Target Mapping for all Entities
    while select dmfEntity
    {
        DMFTargetXMLToEntityMap::generateMapping(dmfEntity);
    }
 
    info("All Done!");
}

This one run for  one entity. Make sure to replace your <Entity Name> with your entity

static void regenerateDMFTargetMapping(Args _args)
{
    DMFTargetXMLToEntityMap     dmfTargetXMLToEntityMap;
    DMFEntity                   dmfEntity;
 
    // delete specified target Mapping
    ttsBegin;
        delete_from dmfTargetXMLToEntityMap where dmfTargetXMLToEntityMap.Entity = <EntityName>;
    ttsCommit;
 
    // Regenerate Target Mapping for specified Entity
    while select dmfEntity where dmfEntity.EntityName = <EntityName>
    {
        DMFTargetXMLToEntityMap::generateMapping(dmfEntity);
    }
 
    info("All Done!");
}

ADVANTAGE OF USING JOBS

Sometimes it is not possible to regenerate the target mapping for a particular entity as clicking on “Modify target mapping” generates an error.   This error typically reads along the lines of

“Duplicate assignment found for the following target field <some field name>”

DMFDuplicateAssignment

“Cannot create a record in Target XML (DMFTargetXML)”

image

Run the job will fix these issues.

2 thoughts on “DIXF – How to regenerate target entities

Leave a comment