The PKFK Change Manager Rule Generation Tab
Published 23 March 2018
The PKFK Change Manager Rule Generation Tab is used to add additional tables to the list displayed on the PKFK Rule Sequence tab of the PKFK Change Manager rule. The addition of a table to the masking sequence will cause the specified columns to be masked in synchronization with the other tables in the rule.
There are two ways to add a table to a PKFK Change Manager rule. The first way is to manually find and specify the table and its columns. This is done using the Manual Add Sync. Rule button found on the Rule Tools and Options Tab. The second way is to use foreign key relationships (if present) to discover the new tables and add them with the click of a mouse. The tools on the PKFK Change Manager Rule Generation Tab are designed to follow the foreign key relationships and enable the reference tables to be added to the rule.
PKFK Change Manager Rule Sequence Before Adding Table
When the PKFK Change Manager is first created (by converting a Substitution or Row-Internal Sync. Rule) it will only have one target table. This target table is the original target table specified in the Substitution or Row-Internal Synch. Rule. The image above shows the contents of the PKFK Rule Sequence tab with only the primary table specified as a target. Note carefully the fact that rules 20-0006-03 and rule 50-0006-06 are alone in their group and have no dependent rules. As detailed in the discussion in the Rule Sections part of the PKFK Change Manager help file, these rules (respectively) will populate the temporary table and then synchronize the target table with the masked contents of the target table.
PKFK Change Manager Rule Generation Tab
If the target columns in the primary table are involved in a foreign key relationship with any other tables, the tools on the Rule Generation Tab can be used to introduce additional tables to the masking sequence. These tables are called secondary tables.
The panel on the left shows all secondary tables currently in use in the PKFK Change Manager rule. In the example above no tables are listed, because only the primary table is present at this time. The panel on the right shows all tables which are related to the primary or secondary tables by foreign keys. As the annotation at the top of the panels states - these are the tables which will have invalid foreign keys if the masking operation proceeds on the tables involved with the PKFK Change Manager rule.
Note in the view above, the primary table is related to the DM_CUSTOMER_NOTES table by the CN_FK foreign key. If there was more than one related table, then the right hand panel would contain a list of values.
Adding a table with the PKFK Change Manager Rule Generation Tab
The tables listed in the right hand panel can be selected with the mouse. If the <<< button is then pressed the table name will move into the left hand panel as shown above. Tables can be easily added to the PKFK Change Manager execution sequence or, if necessary, removed from the sequence with the >>> button. Note that the addition of a table to the sequence can cause other tables to appear in the right hand panel as the display will re-calculate to incorporate the newly added table. In the example above, the right hand panel is empty. There are no other tables known to the masking set which will have their foreign keys rendered invalid by the operations of this PKFK Change Manager rule.
PKFK Change Manager Rule Sequence After Adding Table
Viewing the PKFK Rule Sequence tab after adding a secondary table to the PKFK Change Manager rule it can be seen that some new rules have appeared. Specifically, rules xx-0006-10 and rule 50-0006-13 are now present. Rule xx-0006-10 is dependent on rule 20-0006-09 (the rule numbers have changed slightly with the addition of the new table) and will ensure that any values of the target column which are not already present in the source column of the temporary table will be added to it. The function of rule 50-0006-13 is to fan out the masked values to the target column in the DM_CUSTOMER_NOTES table.
When executed, the temporary table will now get a complete, distinct set of all values from the target columns of the primary and secondary tables and, once masked, those values will be placed into the primary and secondary tables in a synchronized manner by the rules in Rule Block 50.