Run classification
Published 03 November 2024
With the classification-options.json
file now created, the classification step can be ran against the database to create a classification file.
rganonymize classify --database-engine SqlServer --connection-string "[connection string]" --options-file classification-options.json --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:
{ "tables": [ { "schema": "dbo", "name": "Customers", "columns": [ { "name": "CompanyName", "type": "CompanyNames", "maxLength": 40 }, { "name": "ContactName", "type": "FullNames", "maxLength": 30 } ] }, { "schema": "dbo", "name": "Shippers", "columns": [ { "name": "CompanyName", "type": "CompanyNames", "maxLength": 40 } ] }, { "schema": "dbo", "name": "Suppliers", "columns": [ { "name": "CompanyName", "type": "CompanyNames", "maxLength": 40 }, { "name": "ContactName", "type": "FullNames", "maxLength": 30 }, { "name": "HomePage", "type": "Websites", "preserveNulls": true, "maxLength": 20 } ] } ] }
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).