Skip to content
English
  • There are no suggestions because the search field is empty.

2. Create rule sets and global defaults

Learn how to customise rule sets, set individual masking rules, and create and apply global rule sets. This section includes Exercise 2. 

Customise the rule set

A rule set is utilised to determine the appropriate masking rules to be applied to each column in every table of the database. Masking rules define the functions that will substitute values and, in the end, obscure the data.

There are two ways to create rules:

  1. Use global defaults. These are rules that are defined globally. A global rule set is standalone and can be applied to any rule set to copy over the masking rules. This is a fast and powerful way to reuse masking rules between databases.
  2. Add individual masking rules onto each column. This allows you to specify a masking rule for each individual column. 

To edit a rule set, select the ‘Modify’ action for your newly created rule set, then click the play button.
Individual Masking Rules

To add a masking rule to an individual column, locate the column you want to apply a rule to and open the Masking Rules dropdown. This will show any rules that are already in place. To create a new rule, click the 'Add' button.This will open a screen with the following fields:

  • Type: This is the type of masking rule we want to apply. TDA has many different types of rules built in (e.g. address). To reference a list, select 'General'.
  • Function: This is the specific masking rule we would use. These are dependent on the type of masking rule chosen above
  • Where clause: This allows you to apply a where clause statement to your rule
  • Cross reference: This allows you to enter a database name to cross reference

Let's look at a simple example which applies a masking rule to replace the Name column with a random first name, by using the 'Masking.FirstName' data generation function. Another example below uses a List lookup, to lookup data from a seedlist.

  • ListName: This refers to the name of the seedlist you want to use.
  • SelectionTypes: This allows you to choose the way in which values from the seed list will be chosen.
    • For a given column, Random selects a row from the database at random
    • For a given column, Sequential will go down each of the roles sequentially and start from the beginning again once exhausted.
    • Hashing is the process of transforming any given key or a string of characters into another value. Hashing will take a column value, hash it to provide a large number, then modify that number by the number of rows in the list to tell you which row to use. This provides the same column value, same hash algorithm and same rows in the list to provide the same result wherever the hashing is run. 
  • ColumnToReturn: This is the column index in the list to use. This defaults to 1, but you can have a multi-column list.
  • ColumnToHash: This is the column to hash if you use hashing to select the row. This defaults to the column being masked.

Creating Global Defaults

Global defaults refer to universal masking rules that can be integrated into any masking rule set. This enables the creation of universal rules that can be implemented collectively across various rule sets. This feature is particularly beneficial when masking multiple databases.

To view the global defaults in your space, navigate to Enterprise Test Data → Ruleset Explorer → Defaults. This page will tell you whether a tag is applicable to use for global defaults in synthetic data generation, masking, or both.

To edit a global default, click the ‘Edit’ button. This will allow you to configure your tags and values.

Make sure you click on the toggle for ‘Apply Masking Rules’, so it turns blue. 

To apply the global defaults to your masking Data Activity, click on the ‘Apply defaults’ button.

This will bring up a screen that shows which columns in your database will be affected by a global masking rule. It provides the option to apply the rule. Click ‘Apply’ once you’re finished to apply the rules.

Exercise 2 - Create masking rules

  1. Create a masking rule using one of the built-in masking functions such as first name
  2. Create a masking rule using a seedlist
  3. Create a masking rule that uses the value from another column

Need help or want to check your work? Check the solution video here.

Proceed to Section 3 - Create a submit form and mask your database >