Masking file
Published 19 October 2023
The map
command outputs a JSON which serves as input for the masking operation.
Here's what each part means:
- schema: The namespace within the database.
- name: The name of the table.
- exclude: Ignores this table when masking if true, false by default.
- columns: An array of column descriptors.
- name: The name of the column.
- exclude: Ignores this column when masking if true, false by default.
- preserveNulls: Preserves null values from the original data. This is enabled by default.
- maxLength: The maximum length of the data in that column.
- dataset: The name of the dataset that will be used to generate masking data.
- deterministic: Whether or not the masking should be deterministic (i.e. the same input will always produce the same output).
For default behavior, there is no need to edit the masking file before using it as input for the mask
command.
Advanced customization
For advanced use-cases, you can edit the JSON to meet your needs, but it is preferrable to provide an options file.
More information is detailed on our Anonymization configuration page.
In this example, the FirstName column will be masked using the GivenNames dataset. The masking will be deterministic, and the maximum length of the generated data will be 50 characters.
"tables": [ { "schema": "Person", "name": "Address", "columns": [ { "name": "FirstName", "dataset": "GivenNames", "deterministic": true, "maxLength": 50 } ] } ]