Understand implicit delete functionality - HxGN SDx - Update 63 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The implicit delete functionality allows the system to delete or terminate objects and relationships that are no longer being supplied. When exporting data from the staging to target system, you may have some redundant data in the target system that needs to be deleted or terminated. You can configure an implicit delete rule to identify this data and use the Import Validate Delete Export workflow to delete or terminate it in the target system. The system determines which objects to delete or terminate from the database by running user-configured rules, rather than deleting or terminating specified object types.

Data Validator runs the implicit delete rules on the target system data and generates a deletes report containing the data that can be deleted or terminated from the target system, based on the implicit delete rules. The Data Administrator must decide whether to delete or terminate the objects or relationships identified by the deletes report.

Implicit delete checks will only take place after the validation stage is finished. This means that if an object failed validation with a blocking error, it will be skipped during the implicit delete check on its properties or relationships.

You can configure implicit delete rules in the Data Validator Administration module using different types of groupings:

  • Deleting or terminating objects based on

    • class definition grouping

    • property grouping

    • relationship grouping

    • property and relationship grouping

  • Deleting or terminating relationships based on

    • class definition grouping

    • property grouping

    • relationship grouping

    • property and relationship grouping

The following eight scenarios better illustrate the implicit delete functionality, based on the above types of groupings.

Scenario 1: Deleting or terminating objects by class definition

Implicit delete rule: Class definition as the grouping to delete objects

In this example, the CSV local data file in the local staging area is exported to the target system using the class definition as the grouping. The CSV local data file in the staging area contains Company 1, which is exported from the local staging area to the target system. The result of this export is that Company 2 in the target system is set for deletion, as the CSV local data file does not contain Company 2. The deletes report shows that Company 2 is not present in the CSV local data file, so it is deleted implicitly. The implicit delete rule contains only the class definition as the grouping.

Scenario 2: Deleting or terminating objects by property grouping

Implicit delete rule: Object property as the grouping to delete objects

In this example, the CSV local data file in the local staging area is exported to the target system using the Application Owner grouping. The result of the export is that Tag 3 is implicitly deleted in the target system, as the CSV local data does not contain Tag 3 and has the same contractor. However, Tag 2 is not deleted, even though it is not in the CSV local data file, because it is under a different contractor who controls the delete or termination. The deletes report shows that Tag 3 is deleted implicitly.

Scenario 3: Deleting or terminating objects by relationship grouping

Implicit delete rule: Relationship as the grouping to delete objects

In this example, the CSV local data file in the local staging area is exported to the target system using the plant relationship as the grouping. The Application Owner property identifies each contractor that supplied the tags that are related to plants. In this case, when a delete rule uses the plant relationship as the delete grouping, any tags owned by Contractor A, related to Plant 1, and not in the CSV file are deleted. Thus, the Tag 3 and Tag 4 owned by Contractor A and Contractor B respectively are removed from Plant 1 in the target system. The implicit delete will ignore the tag in Plant 2, as the staging system does not contain relationships to Plant 2.

IM_DEL_07

Scenario 4: Deleting or terminating objects by property and relationship grouping

Implicit delete rule: Object property and relationship as the groupings to delete objects

In this example, the CSV local data file in the local staging area is exported to the target system using the Application Owner and plant relationship as the groupings. The Application Owner property identifies each contractor that supplied the tags that are related to plants. In this case, when a delete rule uses the plant relationship and the Application Owner property as the delete groupings, any tags owned by Contractor A, related to Plant 1 and Plant 2, and not in the CSV file are deleted. Thus, Tag 3 owned by Contractor A is removed from Plant 1 in the target system. The implicit delete will ignore the tags from Contractor B, as the staging system does not contain any tags owned by Contractor B.

IM_DEL_12

Scenario 5: Deleting or terminating relationships by class definition grouping

Implicit delete rule: Class definition as the grouping to delete relationships

In this example, the CSV local data file in the local staging area is exported to the target system using the class definition at End 1 as the grouping. The staging area has Tag 1 and Tag 2 as End 1 tags, so the implicit delete rule will check for the tag to tag relationships for these two tags in the target system. Tag 1 has relationships to Tag 3 and Tag 4, and Tag 2 has a relationship to Tag 5, in the staging area. Both Tag 1 and Tag 2 have additional relationships to Tag 6 in the target system, which is not found in the staging area. Hence, their relationships to Tag 6 will be deleted. The relationship from Tag 1 to Tag 7 is not considered, as it is from End 2 to End 1.

IM_DEL_10

Scenario 6: Deleting or terminating relationships by property grouping

Implicit delete rule: Object property as the grouping to delete relationships between objects

In this example, the CSV local data file in the local staging area is exported to the target system using the Application Owner property as the grouping. The Application Owner property of the tag is used to establish that the contractor supplying the CSV file is the same contractor that owns the tag. Thus, Tag 1 and Tag 2 are owned by Contractor A in the staging system. Tag 1 and Tag 2 are End 1 tags, End 1 being the owning end of the relationships. However, in the target system, Tag 1 is owned by Contractor A and Tag 2 is owned by Contractor B. Tag 2 will not be checked for implicit deletes as the application owner is different in the staging and target systems. However, if your validation was set up to fail tags in the case of different owners, Tag 2 would have failed validation already. In the case of Tag 1, the relationship between Tag 1 and Tag 6 will be deleted as this relationship is not found in the staging system.

IM_DEL_08

Scenario 7: Deleting or terminating relationships by relationship grouping

Implicit delete rule: Relationship as the grouping to delete relationships between objects

In this example, the CSV local data file in the local staging area is exported to the target system using the end to end relationship between tags as the grouping, with End 1 as the owning end of the relationship. The staging area has Tag 1, Tag 2, and Tag 7 as End 1 tags, all being related to Unit 1, so the implicit delete rule will check for the tag to tag relationships for these three tags in the target system. Tag 1 has relationships to Tag 3 and Tag 4, and Tag 2 has a relationship to Tag 5 in the staging area. Both Tag 1 and Tag 2 have additional relationships to Tag 6 in the target system, which are not found in the staging area. Hence, their relationships to Tag 6 will be deleted. The relationship from Tag 7 to Tag 8 is not considered for implicit delete, as Tag 7 is related to Unit 2 in the target system, whereas in the staging system, it is related to Unit 1. This means Tag 7 will not be considered for implicit delete checks.

IM_DEL_11

Scenario 8: Deleting or terminating relationships by property and relationship grouping

Implicit delete rule: Object property and relationship as the groupings to delete relationships between objects

In this example, the CSV local data file in the local staging area is exported to the target system using the Application Owner property and the tag to unit relationship as the groupings. The Application Owner property of the tag is used to establish that the contractor supplying the CSV file is the same contractor that owns the tag. The tag to unit relationship is used to establish that Tag 1 and Tag 2 contain the End 1 relationship, End 1 being the owning end of the relationship.

Thus, Tag 1 and Tag 2 are related to the same Unit 1 in both the staging and target systems, but only Tag 1 has the same application owner as well, so only Tag 1 will be compared in the implicit delete. This means that the relationship between Tag 1 and Tag 6 will be deleted in the target system. Tag 7 does have the same application owner in the staging and the target systems, but is related to Unit 1 in the staging system and Unit 2 in the target system. This means the relationship between Tag 7 and Tag 8 is not detected for implicit delete.

IM_DEL_09