Description

When the Traverse Full Hierarchy option is enabled, G-Migration+ will also migrate the other children (and their parents) of the related parent tables (ancestor tables) during the migration to the target database, thus covering the full hierarchy of the tables that are related to each other. By default, G-Migration+ only migrates related records in the ancestor tables and ignores other children (and their parents). 

Please note that this option is only available when a subsetting condition has been added to a table. If masking rules have been added in addition to the subsetting condition for child tables (or their parents) of ancestor tables in the hierarchy, they will be masked as well. Examples of how this works when the option is enabled/disabled are provided in this article. 


In This Article


Example Database Tables

In this example, the Department table has two children: Employee and Project. The Employee table has four children: Address, Attendance, Payroll, and Qualification. The following will occur when the subset condition is on the Payroll table. 

  • Option Disabled (Red Arrows) - Only related records for the Organization, Department, and Employee tables will be migrated, along with the subset of records for the Payroll table. 

  • Option Enabled (Green Arrows) - Related records from other children (and their parents) will be migrated. This means that records for every table shown in the hierarchy below will be migrated to the target database. 

     


Database Table Record Counts

The tables in this example have the following number of records: 

  • Organization - 1 record
  • Department - 4 records
  • Employee - 120 records
    • Address - 120 records
    • Attendance - 120 records
    • Payroll - 120 records
    • Qualification - 120 records
  • Project - 8 records


Subsetting Condition

For the examples in this article, the following subsetting condition has been defined for the Payroll table: 

  • where hours > 10
  • limit - 10 rows



Traverse Full Hierarchy Option Not Enabled (Default Behavior)

Step 1 - G-Migration+ Traverses the Table Hierarchy to Form Queries

It will traverse the table hierarchy from the subset table upward to the top-most parent to create the required queries (see image below).

Step 2 - G-Migration+ Begins the Migration Starting with the Top-Most Parent

The migration starts after the top-most parent (Organization) and works its way downward to the subsetting table (Payroll). For this example, the migration path will look like this: Organization -> Department -> Employee -> Payroll.



Migrated Records for Example

Organization Table

This database only has one Organization record, and it will be migrated. If there were more than one record, only those related to the subset of Payroll records would be migrated.


Department Table 

The Department records related to the subset of Payroll records will be migrated. 


Employee Table 

Employee records related to the subset of Payroll records will also be migrated (10 total).


Payroll Table

The first 10 records that match the subsetting condition (hours > 10) will be migrated to the target database.


Traverse Full Hierarchy Option Enabled

Step 1 - G-Migration+ Traverses the Table Hierarchy to Form Queries

The migration query generation process is the same as the default method, starting with the table that contains the subsetting condition, Payroll. 



Step 2 - Migration of Records

The migration starts from the top-most parent, which is Organization in this example. As it works down the hierarchy, G-Migration+ will also check to see if there are other children (child tables that have not already been traversed) of each ancestor table and migrate those records as well.  The migration order for this example is as follows:

Organization -> Department -> Project -> Employee -> Address -> Attendance -> Qualification -> Payroll


In the visual below, the red arrows represent the default migration path, and the green arrows show the additional child tables that will have related records migrated as well.


Migrated Records for Example

G-Migration+ will migrate the same Payroll, Employee, Department, and Organization table records to the target database as when this option is not enabled. In addition to these records, related records for the Project, Address, Attendance, and Qualification tables will also be migrated to the target database.

Organization Table

This database only has one Organization record, and it will be migrated. If there were more than one record, only those related to the subset of Payroll records would be migrated.


Department Table 

The Department records related to the subset of Payroll records will be migrated.


Projects Table 

Project records for the related Department records of the subset of Payroll records will be migrated (2 total).


Employee Table 

Employee records related to the subset of Payroll records will also be migrated (10 total).


Address Table

Address records for the related Employee records of the subset of Payroll records will be migrated (10 total).


Attendance Table

Attendance records for the related Employee records of the subset of Payroll records will be migrated (10 total).


Qualification

Qualification records for the related Employee records of the subset of Payroll records will be migrated (10 total).


Payroll Table

The first 10 records that match the subsetting condition (hours > 10) will be migrated to the target database.