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

rganonymize classify 
  --database-engine SqlServer 
  --connection-string "[connection string]"
  --classification-file classification.json
OptionRequired?Notes
--database-engine (tick)

The type of the database to classify.

Must be one of:

  • MySql 
  • Oracle 
  • PostgreSql 
  • SqlServer 
--connection-string (tick)

The connection string of the database to classify.

Example formats 

--classification-file (tick)

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

--options-file (error)

The file path to an options file.

--output-all-columns (error)

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

--output(error)

The format to use for the output classification file.

Can be one of:

  • Json (Default)
  • Yaml
--output-schema-file(error)

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.

--log-level 

(error)

The verbosity level to log at.

Can be one of:

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

 -?, -h, --help 

(error)

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

rganonymize map 
  --classification-file classification.json
  --masking-file masking.json
OptionRequired?Notes
--classification-file (tick)

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

--masking-file (tick)

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

--options-file (error)

File path to an options file.

--output(error)

The format to use for the output classification file.

Can be one of:

  • Json (Default)
  • Yaml
--output-schema-file(error)

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.

--log -level 

(error)

The verbosity level to log at.

Can be one of:

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

Show help and usage information.

Mask

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

rganonymize mask 
  --database-engine SqlServer
  --connection-string "[connection string]"
  --masking-file masking.json
OptionRequired?Notes
--database-engine (tick)

Type of the database to classify

Must be one of:

  • MySql 
  • Oracle 
  • PostgreSql 
  • SqlServer 
--connection-string (tick)

The connection string of the database to classify.

Example formats 

--masking-file (tick)

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

--options-file (error)

The file path to an options file.

--connection-timeout(error)

The timeout (in seconds) to use when connecting to the database. Default: 15s

--command-timeout(error)

The timeout (in seconds) to use when executing commands against the database. Default: 30s

--deterministic-seed(error)

The seed to use for deterministic masking.

--dry-run (error)

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. 

--log-level 

(error)

The verbosity level to log at.

Can be one of:

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

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.
rganonymize options default-classification-rules
  --path options.json
OptionRequired?Notes
--path(tick) 

The path of the options file to generate.

--output(error) 

The format to use for the output classification file.

Can be one of:

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

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 (error) 

Show help and usage information.


Didn't find what you were looking for?