Redgate Test Data Manager

Anonymize command-line reference

This page provides details for each of the commands available on Anonymize CLI.

Classify

Automatically discover which columns of a database contain PII (personally identifiable information).

anonymize classify 
--database-engine SqlServer 
--connection-string "Server=[Your_Server_Address]; Database=[Your_Database_Name]; User Id=[Your_Login_Name]; Password=[Your_Password]; Trust Server Certificate=true;"
--classification-file classification.json

Flag syntaxRequired?Notes
--database-engine REQUIRED

The type of the database to classify.

Must be one of:

  • MySql 
  • Oracle 
  • PostgreSql 
  • SqlServer 
--connection-string REQUIRED

The connection string of the database to classify.

Example formats 

--classification-file REQUIRED

The file path to save the classification to, including file name and file extension.

--options-file Optional

The file path to an options file.

--output-all-columns Optional

Include all columns in the classification output file, including columns with no classification.

--outputOptional

The format to use for the output classification file.

Can be one of:

  • Json (Default)
  • Yaml
--output-schema-fileOptional

Output a schema file to aid with hand editing the classification file.

The schema can be used with some IDEs to provide prompts and documentation on the expected structure when editing.

--logging-level 

Optional

The verbosity level to log at.

Can be one of:

  • Verbose
  • Debug
  • Information (Default)
  • Warning
  • Error
  • Fatal

 -?, -h, --help 

Optional

Show help and usage information.

Map

Maps a classification file to a masking file.

This command provides the integration between automatic discovery of PII (Classify) and automatic data anonymization (Mask).

anonymize map 
--classification-file classification.json
--masking-file masking.json

Flag syntaxRequired?Notes
--classification-file REQUIRED

The file path of the input classification file, including file name and file extension.

--masking-file REQUIRED

The file path of where to save the output masking file, including file name and file extension.

--options-file Optional

File path to an options file.

--outputOptional

The format to use for the output classification file.

Can be one of:

  • Json (Default)
  • Yaml
--output-schema-fileOptional

Output a schema file to aid with hand editing the classification file.

The schema can be used with some IDEs to provide prompts and documentation on the expected structure when editing.

--logging-level Optional

The verbosity level to log at.

Can be one of:

  • Verbose
  • Debug
  • Information (Default)
  • Warning
  • Error
  • Fatal
 -?, -h, --help Optional

Show help and usage information.

Mask

Replaces real values in a database with realistic fake data through data substitution.

anonymize mask 
--database-engine SqlServer
--connection-string "Server=[Your_Server_Address]; Database=[Your_Database_Name]; User Id=[Your_Login_Name]; Password=[Your_Password]; Trust Server Certificate=true;"
--masking-file masking.json

Flag syntaxRequired?Notes
--database-engine REQUIRED

Type of the database to classify

Must be one of:

  • MySql 
  • Oracle 
  • PostgreSql 
  • SqlServer 
--connection-string REQUIRED

The connection string of the database to classify.

Example formats 

--masking-file REQUIRED

The file path of the input masking file, including file name and file extension.

--options-file Optional

The file path to an options file.

--connection-timeoutOptional

The timeout (in seconds) to use when connecting to the database.

--command-timeoutOptional

The timeout (in seconds) to use when executing commands against the database.

--deterministic-seedOptional

The seed to use for deterministic masking.

--dry-run Optional

Perform a dry-run with no masking.

This is a 'validation only' option that allows you to ensure your masking file and options file are configured correctly without modifying the database.

If issues are found, they are sent to STDOUT in a JSON structure. This gives you specific information about the issues, and helps you identify and fix any problems before they arise. 

--logging-level 

Optional

The verbosity level to log at.

Can be one of:

  • Verbose
  • Debug
  • Information (Default)
  • Warning
  • Error
  • Fatal
 -?, -h, --help Optional

Show help and usage information.


Options

Generates an options file containing the Redgate supplied default rules.

The options file will contain two sections:

  • a section to disable the default rules.
  • a section that defines the default rules as custom rules, allowing them to be altered as necessary.


anonymize options default-classification-rules
--path options.json
Flag syntaxRequired?Notes
--pathREQUIRED

The path of the options file to generate.

--outputOptional

The format to use for the output classification file.

Can be one of:

  • Json (Default)
  • Yaml
--output-json-schema Optional

Output a schema file to aid with hand editing the classification file.

The schema can be used with some IDEs to provide prompts and documentation on the expected structure when editing.

 -?, -h, --help Optional

Show help and usage information.


Didn't find what you were looking for?