Nth Level Data Migration Guide – RTBF /De-identification

In the Cloud Compliance application, the “RTBF/De-identification” feature uses mappings that store data in the custom objects available in a package. This document showcases how Object mappings up to Nth Level can be transferred from one org to another in order to efficiently migrate data from sandbox to production.

Process Summary

The first step of the data migration process is to extract the CSV files from the source org that contains the mapping data. Extraction can effortlessly be done using Workbench. When the CSV files are ready, these files need to be pushed into the destination org using Workbench. We illustrate this process in detail, below.
This document should be used only as a reference guide as every Org is different and has its unique objects and structure.

Prerequisites

Before starting the Data Migration process, the user needs to create a custom field (data type – Text ) with the name “Migration Key” on the objects i.e ‘De-identification Master’, ’De-identification Detail’  and ‘Pseudo Data Object Mappings ’in the destination Org. This custom field should be of type ‘Text’, Case Sensitive, and ‘Unique Record Identifier from an external system’.

1.png

Solutions Steps

Nth Level Data migration for RTBF/De-identification
Total Objects:  4

  • De-Identification Master 
  • De-Identification Detail
  • Pseudo Data Object Mappings
  • Data Field Mappings

1. De-Identification Master 
API Name :  PCCC_DM__DeIdentification_Master__c

To create a CSV file, the workbench SOQL for De-Identification Master should be as follows –

SELECT Id, Name, PCCC_DM__Description__c, PCCC_DM__Error_Message__c, PCCC_DM__Has_Error__c, PCCC_DM__isActive__c, PCCC_DM__isCustom__c, PCCC_DM__isDefault__c, PCCC_DM__Target_Object__c FROM PCCC_DM__DeIdentification_Master__c


Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type as De-identification Master. Select the CSV file that needs to be pushed to the destination.
  2. Map Fields – ‘Migration_Key__c with ‘Id’
2.png

2. De-Identification Detail
API Name :  PCCC_DM__DeIdentification_Detail__c

De-identification Detail may contain objects till the Nth level in the mapping. Create separate CSV for each level using the managed package custom field “Running Index”.

Note – Running Index starts from 0, 100, 200, 300…., and so on. The parent object does not have a Running Index value. So, all the Level 1 objects in the mapping will have a Running Index of 0, Level 2 objects will have a Running Index of 100, Level 2 objects will have a Running Index of 200, and so on. 

To create a CSV file for De-identification Detail records containing only Level 1 objects, the workbench SOQL should be as follows –

SELECT Id, Name, PCCC_DM__Running_Index__c, PCCC_DM__DeIdentification_Detail_Mapping__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Error_Message__c, PCCC_DM__Filter_Field__c, PCCC_DM__Has_Error__c, PCCC_DM__isCustom__c, PCCC_DM__Object_Name__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c, PCCC_DM__Type__c FROM PCCC_DM__DeIdentification_Detail__c WHERE PCCC_DM__Running_Index__c = 0

Push the  De-identification Detail with Level 1 CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type as De-identification Detail with Level 1 CSV file that needs to be pushed in a destination.
  2. Map Fields
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.
3.png

To create a CSV file for De-identification Detail records containing only Level 2 objects, the workbench SOQL should be as follows –

SELECT Id, Name, PCCC_DM__Running_Index__c, PCCC_DM__DeIdentification_Detail_Mapping__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Error_Message__c, PCCC_DM__Filter_Field__c, PCCC_DM__Has_Error__c, PCCC_DM__isCustom__c, PCCC_DM__Object_Name__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c, PCCC_DM__Type__c FROM PCCC_DM__DeIdentification_Detail__c WHERE PCCC_DM__Running_Index__c = 100

Push the De-identification Detail with Level 2 CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type as De-identification Detail with Level 2 CSV file that needs to be pushed in a destination.
  2. Map Fields –
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Detail_Mapping__C’ with Smart Look  Field i.e ‘PCCC_DM_DeIdentification_Detail__C.Migration_Key__c’.
    •  ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.

The below screenshot shows the first two mapping fields – 

4.png

The one below shows the third mapping field –

5.png

To create a CSV file for De-identification Detail records containing only Level 3 objects, the workbench SOQL should be as follows –

SELECT Id, Name, PCCC_DM__Running_Index__c, PCCC_DM__DeIdentification_Detail_Mapping__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Error_Message__c, PCCC_DM__Filter_Field__c, PCCC_DM__Has_Error__c, PCCC_DM__isCustom__c, PCCC_DM__Object_Name__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c, PCCC_DM__Type__c FROM PCCC_DM__DeIdentification_Detail__c WHERE PCCC_DM__Running_Index__c = 200

Push the De-identification Detail with Level 3 CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type as De-identification Detail with Level 3 CSV file that needs to be pushed in a destination
  2. Map Fields –
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Detail_Mapping__C’ with Smart Look  Field i.e ‘PCCC_DM_DeIdentification_Detail__C.Migration_Key__c’.
    •  ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.

The below screenshot shows the first two mapping fields – 

6.png

The one below shows the third mapping field –

7.png

In a similar way, user can create CSV’s for all the levels and push to the destination org.

3. Pseudo Data Object Mappings
API Name :  PCCC_DM__Pseudo_Data_Object_Mappings__c

To create a CSV file, the workbench SOQL for Pseudo Data Object Mappings should be as follows –

SELECT Id, Name, PCCC_DM__Activated_On__c, PCCC_DM__Active__c, PCCC_DM__Cascade_Delete__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Delete_Attachment__c, PCCC_DM__Delete_Email_History__c, PCCC_DM__Delete_Event__c, PCCC_DM__Delete_Feed_Tracking__c, PCCC_DM__Delete_Field_History__c, PCCC_DM__Delete_Files__c, PCCC_DM__Delete_Notes__c, PCCC_DM__Delete_Object__c, PCCC_DM__Delete_Task__c, PCCC_DM__Description__c, PCCC_DM__De_identification_Preview__c, PCCC_DM__External_Id__c, PCCC_DM__Hard_Delete__c, PCCC_DM__Inactivated_On__c, PCCC_DM__Source_Object_API__c, PCCC_DM__Source_Object__c, PCCC_DM__TotalFieldMapped__c FROM PCCC_DM__Pseudo_Data_Object_Mappings__c


Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type and CSV file that needs to be pushed in the destination.
  2. Map Fields
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.
8.png

4. Data Field Mappings
API Name :  PCCC_DM__Pseudo_Data_Field_Mappings__c

To create a CSV file, the workbench SOQL for Pseudo Data Field Mappings should be as follows –

SELECT Id, Name, PCCC_DM__Actions__c, PCCC_DM__Activated_On__c, PCCC_DM__Active__c, PCCC_DM__Comments__c, PCCC_DM__Deactivated_On__c, PCCC_DM__Default_Replacement_Value__c, PCCC_DM__Destination_Field_API__c, PCCC_DM__Destination_Field__c, PCCC_DM__Error_Message__c, PCCC_DM__Has_Error__c, PCCC_DM__Object_Active__c, PCCC_DM__Pseudo_Data_Object_Mappings__c, PCCC_DM__Source_Field_API__c, PCCC_DM__Source_Field_Length__c, PCCC_DM__Source_Field_Required__c, PCCC_DM__Source_Field_Type__c, PCCC_DM__Source_Field__c, PCCC_DM__Source_Object_API__c, PCCC_DM__Source_Object__c, PCCC_DM__Store_Proof__c FROM PCCC_DM__Pseudo_Data_Field_Mappings__c


Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and select object type as PCCC_DM__Pseudo_Data_Field_Mappings__c. Select CSV file that needs to be pushed to destination.
  2. Map Fields
  • PCCC_DM__Pseudo_Data_Object_Mappings__c with PCCC_DM__Pseudo_Data_Object_Mappings__c.Migration_Key__c
9.png

Powered by BetterDocs