Customize mapping

We're going to customize mapping to do the following:

A. Correct an incorrect classification

B. Add a custom masking

C. Supply custom datasets


These customizations will be done using the options file passed to the mapping.

This can also be done by editing the classification.json file, but any changes will get overwritten next time classification is run.

A. Correct an incorrect classification

  1. {
  2. "tables": [
  3. {
  4. "schema": "dbo",
  5. "name": "Suppliers",
  6. "columns": [
  7. {
  8. "name": "ContactName",
  9. "type": "FamilyNames"
  10. }
  11. ]
  12. }
  13. ]
  14. }

This changes the classification of the ContactName column in the dbo.Suppliers table to "FamilyNames".

B. Add a custom masking

  1. {
  2. "tables": [
  3. {
  4. "schema": "dbo",
  5. "name": "Suppliers",
  6. "columns": [
  7. {
  8. "name": "ContactTitle",
  9. "dataset": "JobTitles"
  10. }
  11. ]
  12. }
  13. ]
  14. }

This configures the ContactTitle column in the dbo.Suppliers table to be masked as "JobTitles".

C. Supply custom datasets

  1. {
  2. "datasets": [
  3. {
  4. "name": "CompanyNames",
  5. "type": "List",
  6. "values": [ "Redgate Software", "Microsoft", "Google", "Amazon", "Apple", "Facebook", "Twitter" ]
  7. },
  8.    {
  9. "name": "JobTitles",
  10. "type": "List",
  11. "values": [ "CEO", "CTO", "Director", "Engineer", "Developer", "Designer", "Analyst", "Consultant" ]
  12. }
  13. ]
  14. }

This supplies two custom datasets, "JobTitles" and "CompanyNames", that will be used in the masking step.

mapping-options.json

Putting the configurations for A-C above together into one options file produces the following:

  1. {
  2. "tables": [
  3. {
  4. "schema": "dbo",
  5. "name": "Suppliers",
  6. "columns": [
  7. {
  8. "name": "ContactName",
  9. "type": "FamilyNames"
  10. },
  11. {
  12. "name": "ContactTitle",
  13. "dataset": "JobTitles"
  14. }
  15.     ]
  16. }
  17. ],
  18. "datasets": [
  19. {
  20. "name": "CompanyNames",
  21. "type": "List",
  22. "values": [ "Redgate Software", "Microsoft", "Google", "Amazon", "Apple", "Facebook", "Twitter" ]
  23. },
  24.   {
  25. "name": "JobTitles",
  26. "type": "List",
  27. "values": [ "CEO", "CTO", "Director", "Engineer", "Developer", "Designer", "Analyst", "Consultant" ]
  28. }
  29. ]
  30. }

This should be saved into a file called mapping-options.json, and will be passed into the mapping step when it is run.



Didn't find what you were looking for?