Run classification

With the classification-options.json file now created, the classification step can be ran against the database to create a classification file.

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

This takes the classification-options.json file as input, classifies the tables and columns in the database (ignoring the excluded ones from the configuration), and outputs a classification.json file:

  1. {
  2.   "tables": [
  3.     {
  4.       "schema": "dbo",
  5.       "name": "Customers",
  6.       "columns": [
  7.         {
  8.           "name": "CompanyName",
  9.           "type": "CompanyNames",
  10.           "maxLength": 40
  11.         },
  12.         {
  13.           "name": "ContactName",
  14.           "type": "FullNames",
  15.           "maxLength": 30
  16.         }
  17.       ]
  18.     },
  19.     {
  20.       "schema": "dbo",
  21.       "name": "Shippers",
  22.       "columns": [
  23.         {
  24.           "name": "CompanyName",
  25.           "type": "CompanyNames",
  26.           "maxLength": 40
  27.         }
  28.       ]
  29.     },
  30.     {
  31.       "schema": "dbo",
  32.       "name": "Suppliers",
  33.       "columns": [
  34.         {
  35.           "name": "CompanyName",
  36.           "type": "CompanyNames",
  37.           "maxLength": 40
  38.         },
  39.         {
  40.           "name": "ContactName",
  41.           "type": "FullNames",
  42.           "maxLength": 30
  43.         },
  44.         {
  45.           "name": "HomePage",
  46.           "type": "Websites",
  47.           "preserveNulls": true,
  48.           "maxLength": 20
  49.         }
  50.       ]
  51.     }
  52.   ]
  53. }

Lines 7-11 show the CompanyName column of the dbo.Customers table classified with a custom classification rule (B).

Lines 12-16 show the ContactName column of the dbo.Customers table classified with the "FullNames" built-in classification rule (A).

Lines 23-27 show the CompanyName column of the dbo.Shippers table classified with a custom classification rule (B).

Lines 34-38 show the CompanyName column of the dbo.Suppliers table classified with a custom classification rule (B).

Lines 39-43 show the ContactName column of the dbo.Suppliers table classified with the "FullNames" built-in classification rule (A).

Lines 44-49 show the HomePage column of the dbo.Suppliers table classified with a custom classification (C).



Didn't find what you were looking for?