You are currently viewing Update Source Keys using HDL for business objects
Update Source Keys using HDL for business objects

In this article we will look into how to update the source keys using HDL that have already been loaded earlier.

There could be scenarios where we may need to update the source keys of existing business objects as they have been loaded with incorrect source key information due to the developer not being aware of which one to use or the requirement changed later on. In both the cases we will have to update the source key information.

The source keys information is not available on the application to view online. So it is completely a backend process. We will have to write SQL queries out of the HRC_INTEGRATION_KEY_MAP table and get the info and prepare the DAT file and load it to update the source keys. Read through the below posts to get to know more info on how to use source keys and how to retrieve them using SQL Query.

The HDL file for source key updation is SourceKey.dat

Here is the sample HDL file to update the Worker Business Object and Person Address from FUSION Source System Owner to VISION Source System Owner.

METADATA|SourceKey|BusinessObject|Component|OldSourceSystemId|OldSourceSystemOwner|NewSourceSystemId|NewSourceSystemOwner
MERGE|SourceKey|Worker|PersonAddress|2342|FUSION|1422-HOME|VISION

In some cases the transactions are done on the application and the system loads the Source System Owner as FUSION for all the online transactions. However if you want to update such cases to a different Source System Owner, you can use this file to update the Source Key information.

We can update both Source System Owner and Source System ID using this approach. We will have to mention both the old Source System Owner, ID and New Source System Owner, ID on the DAT file.

Once you load this file, the Source System Keys will be updated in the backend tables.

If you have any downstream integrations based on this data out of the Source System Owner, they will pickup these entries now.

Hope this helps when you have similar requirement.