Run mapping

With the mapping-options.json file now created, the mapping step can be ran to create a masking file.

  1. rganonymize map
  2. --options-file mapping-options.json
  3. --classification-file classification.json
  4. --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:

  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": "HomePage",
  48. "dataset": "Websites",
  49. "preserveNulls": true,
  50. "maxLength": 20
  51. },
  52. {
  53. "name": "ContactTitle",
  54. "dataset": "JobTitles"
  55. }
  56. ]
  57. }
  58. ],
  59. "datasets": [
  60. {
  61. "name": "JobTitles",
  62. "type": "List",
  63. "values": [ "CEO", "CTO", "Director", "Engineer", "Developer", "Designer", "Analyst", "Consultant" ]
  64. },
  65. {
  66. "name": "CompanyNames",
  67. "type": "List",
  68. "values": [ "Redgate Software", "Microsoft", "Google", "Amazon", "Apple", "Facebook", "Twitter" ]
  69. }
  70. ]
  71. }

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).



Didn't find what you were looking for?