Masking
Published 17 May 2024
Masking is the final step in the process with Anonymize. The mask
operation takes the masking rules generated by the map
command and applies them to the database, effectively anonymizing the sensitive data.
Pro tip: It's recommended that you run the classify
and map
operations prior to running the mask
operation in order to generate the necessary JSON files.
Important: Masking will overwrite data in the target database. Do not use this on a production database.
Masking File Structure
The map
command outputs a JSON file that serves as input for the masking operation. This file contains information about the schema, table names, column names, and the masking rules for each column.
In most cases, you won't need to edit the masking file before using it as input for the mask
command. If you do need to make changes, it's usually better to provide an options file:
- The classification and masking files are generated from scratch each time you run the
classify
ormap
commands, so any manual changes made to these files will be lost (unless you use version control). - The options file allow you to store your anonymization configuration separately, making it easier to manage and maintain your settings across multiple runs.
You can find more details on the custom configuration page.
Next Steps
- To dive deeper into the masking file structure, check out the Masking file structure page.
- Once you have the masking file, you're ready to run the
mask
command to anonymize your database. Head over to the command-line reference for more info on themask
command. - If you need to customize the masking rules, take a look at the custom configuration page.