Skip to main content
Skip table of contents

Using Determinstic Masking (Generate)

Personal data is often used in more than one place. Names, Addresses, Companies, etc are stored in multiple tables and even in multiple database types. Masking data in a consistent deterministic approach can be hard to achieve. In the chapter about translation tables you already learned how you can reuse the stored masking result from a translation table with the use of the value lookup. In Privacy 4.1 we've added a new approach to mask data like names in a consistent way without copying any translation tables. 

We can use one of generators in deterministic mode to replace existing values with synthetic ones picked from a seed list. DATPROF Privacy offers a lot of built in seed lists, but you can also bring your own. 

In the following steps we will first disable the Shuffle on CUSTOMERS.LAST_NAME, LAST_NAME_UPPER and the Value Lookup on CUSTOMERS_HISTORY.LAST_NAME. 

  • Select the CUSTOMERS table (if not selected already)
  • From the list of functions right click the Shuffle on LAST_NAME, LAST_NAME_UPPER and click Edit...
  • Uncheck the enabled checkbox to disable the function and click OK to save the changes. 

  • Select the CUSTOMERS_HISTORY table 
  • From the list of functions right click the Value Lookup on LAST_NAME and click Edit...
  • Uncheck the enabled checkbox to disable the function and click OK to save the changes. 

Great! Now we will add some deterministic generators to replace last names consistent in both CUSTOMERS and CUSTOMERS_HISTORY. 

  • Select the CUSTOMERS table 
  • Right click the LAST_NAME column and click Add function → Generate...
  • Select the Last name generator from the generator drop down list
  • Select as language US 
  • Change the generation mode from Random to Deterministic
  • Change the salt into My#FirstSpecialS@lt. The salt is used to deterministic replace original values into seed values. When using/changing the salt, the results will change. 
  • Click OK to add the function

  • Now select the CUSTOMERS_HISTORY table
  • Right click the LAST_NAME column and click Add function → Generate...
  • Select the Last name generator from the generator drop down list
  • Select as language US 
  • Change the generation mode from Random to Deterministic
  • Change the salt into My#FirstSpecialS@lt. Note: by using the same configuration as the CUSTOMERS.LAST_NAME generator we make sure that all last names will be replaced consistent. 
  • Click OK to add the function

Awesome! You are now able to mask data consistent within one template. If you want to make sure that the same output in also guaranteed over multiple templates than use the same Global Salt in each template. 

  • Go from the Development into the Deployment area. 
  • Under the tab Settings you can find the global salt for this template. By default this is different for each template. Copy and use the same Global salt for each template to make consistent deterministic masking possible over multiple templates.

Because we have disabled the shuffle on LAST_NAME and LAST_NAME_UPPER we have to make sure that LAST_NAME_UPPER is also masked. We can easily to this by adding custom expression on that column. 

  • Select the CUSTOMERS table
  • Right click the LAST_NAME_UPPER column and click Add funtion → Custom Expression...
  • We will be using the generated LAST_NAME value by entering the following expression: 

  • We have to add a dependency with the generator on LAST_NAME. Click the Dependencies tab
  • Click Edit...
  • In the predecessors list select the generator on CUSTOMERS.LAST_NAME
  • Click OK to apply the dependency 
  • Click OK to add the function
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.