About Insertion Rules
Published 22 March 2018
Insertion rules are not really a masking rule - they build data rather than scramble it. The presence of Insertion rules means the Data Masker software can function as a useful generator of test data for new systems. Insertion rules are usually used to start an initial build of data in a new database.
Insertion rules are designed to create new data rows by populating selected table columns with realistic looking data. Subsequent Substitution Rules are then applied to fill in the rest of the contents of the table as required. The choice of the inserted data is configurable by associating datasets with the columns selected for the rule. Datasets for just about every purpose are included with the Data Masker software and you can make up your own if you need to do so. The choice of dataset used for a particular column is entirely up to the implementer of the Insertion rule.
An Insertion rule will create new rows by inserting into the specified columns. This implies that the remaining columns in the table will contain NULL values and that the Insertion rule must be configured to populate all NOT NULL columns in the table. Typically after the NOT NULL columns are populated subsequent Substitution Rules are then used to populate the remaining columns in the table.
For example, a column containing 1000 customer ID numbers could be created by implementing an Insertion rule on it using the Numbers, Integer, Sequential dataset with the Number of Rows to Insert option set to 1000. When the Insertion rule is executed as part of the masking set, 1000 numeric sequential values (with a specified start point and increment) would be generated and inserted into the table. After the rule execution completes, the table will contain 1000 rows with reasonable looking customer ID numbers and the remaining fields (first names, last names, addresses, company names, etc.) can be filled in through the use of Substitution rules. Once the rule has begun to execute, the insertion continues until all specified rows have been created. Commits happen at user configurable intervals (every 1000 rows is the default).
How to Create a New Insertion rule