Run mapping
Published 03 November 2024
With the mapping-options.json
file now created, the mapping step can be ran to create a masking file.
- rganonymize map
- --options-file mapping-options.json
- --classification-file classification.json
- --masking-file masking.json
This takes the mapping-options.json
and classification.json
files as input, maps the classifications to the relevant masking rules, and outputs a masking.json
file:
- {
- "tables": [
- {
- "schema": "dbo",
- "name": "Customers",
- "columns": [
- {
- "name": "CompanyName",
- "dataset": "CompanyNames",
- "maxLength": 40
- },
- {
- "name": "ContactName",
- "dataset": "FullNames",
- "deterministic": true,
- "maxLength": 30
- }
- ]
- },
- {
- "schema": "dbo",
- "name": "Shippers",
- "columns": [
- {
- "name": "CompanyName",
- "dataset": "CompanyNames",
- "maxLength": 40
- }
- ]
- },
- {
- "schema": "dbo",
- "name": "Suppliers",
- "columns": [
- {
- "name": "CompanyName",
- "dataset": "CompanyNames",
- "maxLength": 40
- },
- {
- "name": "ContactName",
- "dataset": "FamilyNames",
- "deterministic": true,
- "maxLength": 30
- },
- {
- "name": "HomePage",
- "dataset": "Websites",
- "preserveNulls": true,
- "maxLength": 20
- },
- {
- "name": "ContactTitle",
- "dataset": "JobTitles"
- }
- ]
- }
- ],
- "datasets": [
- {
- "name": "JobTitles",
- "type": "List",
- "values": [ "CEO", "CTO", "Director", "Engineer", "Developer", "Designer", "Analyst", "Consultant" ]
- },
- {
- "name": "CompanyNames",
- "type": "List",
- "values": [ "Redgate Software", "Microsoft", "Google", "Amazon", "Apple", "Facebook", "Twitter" ]
- }
- ]
- }
Lines 3-30 show the mapping from the classification file.
Lines 35-39 show the mapping from the classification file.
Lines 40-45 show the corrected classification for the ContactName
column of the dbo.Suppliers
(A).
Lines 46-51 show the mapping from the classification file.
Lines 52-55 show the custom masking (B).
Lines 60-69 show the custom datasets (C).