Run masking

With the masking-options.json file now created, the masking step can be ran to anonymize the data in the database.

  1. rganonymize mask
  2. --database-engine SqlServer
  3. --connection-string "[connection string]"
  4. --options-file masking-options.json
  5. --masking-file masking.json

This takes the masking-options.json and masking.json files as input and masks the data in the database based on the combination of the information contained in them.

The resultant applied masking configuration is:

  1. {
  2. "tables": [
  3. {
  4. "schema": "dbo",
  5. "name": "Customers",
  6. "columns": [
  7. {
  8. "name": "CompanyName",
  9. "dataset": "CompanyNames",
  10. "maxLength": 40
  11. },
  12. {
  13. "name": "ContactName",
  14. "dataset": "FullNames",
  15. "deterministic": true,
  16. "maxLength": 30
  17. }
  18. ]
  19. },
  20. {
  21. "schema": "dbo",
  22. "name": "Shippers",
  23. "columns": [
  24. {
  25. "name": "CompanyName",
  26. "dataset": "CompanyNames",
  27. "maxLength": 40
  28. }
  29. ]
  30. },
  31. {
  32. "schema": "dbo",
  33. "name": "Suppliers",
  34. "columns": [
  35. {
  36. "name": "CompanyName",
  37. "dataset": "CompanyNames",
  38. "maxLength": 40
  39. },
  40. {
  41. "name": "ContactName",
  42. "dataset": "FamilyNames",
  43. "deterministic": true,
  44. "maxLength": 30
  45. },
  46. {
  47. "name": "ContactTitle",
  48. "dataset": "JobTitles"
  49. },
  50.        {
  51. "name": "HomePage",
  52. "dataset": "Websites",
  53. "preserveNulls": true,
  54. "maxLength": 20
  55. }
  56. ]
  57. },
  58. {
  59. "schema": "dbo",
  60. "name": "Territories",
  61. "columns": [
  62. {
  63. "name": "TerritoryDescription",
  64. "dataset": "Cities"
  65. }
  66. ]
  67. }
  68. ],
  69. "datasets": [
  70. {
  71. "name": "CompanyNames",
  72. "type": "List",
  73. "values": [ "Redgate Software", "Microsoft", "Google", "Amazon", "Apple", "Facebook", "Twitter" ]
  74. },
  75. {
  76. "name": "JobTitles",
  77. "type": "List",
  78. "values": [ "CEO", "CTO", "Director", "Engineer", "Developer", "Designer", "Analyst", "Consultant" ]
  79. },
  80.  {
  81. "name": "Websites",
  82. "type": "List",
  83. "values": [ "https://www.example.com", "https://www.test.com", "https://www.google.com" ]
  84. }
  85. ],
  86. "settings": {
  87. "dateTimeFormats": [
  88. "YYYY-MM-dd",
  89. "yyyy-mm-dd HH:mm:ss"
  90. ]
  91. }
  92. }

Lines 3-57 show the configuration from the masking.json file.

Lines 62-65 show custom masking (A).

Lines 70-74 show a custom dataset (B).

Lines 75-84 show custom datasets from the masking.json file.

Lines 87-90 show custom date/time formats (C).



Didn't find what you were looking for?