Anonymizer CLI Reference

All Anonymizer commands follow this syntax:

java -jar <path_to_>/cloudera_anonymizer-<x.x>.jar [anonymize | denonymize] [sql |csv | table_stats | column_stats] <path_to_input_file> [additional_tool_options]

Where:

"ANONYMIZE" OPERATION ON "CSV" FILE TYPE

The following options are available when you specify the anonymize operation and the csv file type:

  • --anonymize_cols, -z

    Specifies the position of columns to encrypt in addition to the column containing query text. Column position is determined by counting from the left-most column, starting with 1. No default setting. Optional.

    Example:
    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -z 3,4,5
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -z specifies the column position of extra columns to be encrypted.

  • --dbvendor, -v

    Specifies the source database platform of the input file. No default setting. Required for anonymize and deanonymize operations on csv and sql files.

    Available values:

    • ACCESS
    • ANSI
    • DB2
    • FIREBIRD
    • GENERIC
    • GREENPLUM
    • HIVE
    • IMPALA
    • INFORMIX
    • MSSQL
    • MYSQL
    • NETEZZA
    • ORACLE
    • POSTGRESQL
    • SYBASE
    • TERADATA

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE 
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, and -v specifies the database vendor.

  • --errorfile, -e

    Specifies the location where the error output file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -e ./error_output_file
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -e specifies the location of the error output file.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv --help
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. No default setting. Optional.

    Use this option for an anonymize operation when you want to use the same password to decrypt multiple files with the same .passkey file. For example, you might upload multiple CSV files and associated table statistics and column statistics files. In this case, using only one .passkey file in the Navigator Optimizer UI is convenient.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -k specifies the path to the .passkey file.

  • --noheader, -h

    Specifies there is no header row in the input CSV file, so the first row of the file is encrypted. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -h
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -h specifies there is no header row in the input file.

  • --output, -o

    Specifies the location where the encrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -o
      ./encrypted_file.csv
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -o specifies the location where the encrypted file is written.

  • --query_col_number, -q

    Specifies the position of the column containing query text.Column position is determined by counting from the left-most column, starting with 1. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, and -v specifies the database vendor.

  • --skip_identifiers, -t

    Specifies that no SQL identifiers are encrypted. For example, table names, column names, view names, database names, and aliases. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -t
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -t specifies that no SQL identifiers are to be encrypted.

  • --skip_literals, -l

    Specifies that no literals are masked. Literals are the constant values or the fixed data values in SQL queries. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -l
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -l specifies that no literals are to be masked.

"DEANONYMIZE" OPERATION ON "CSV" FILE TYPE

The following options are available when you specify the deanonymize operation and the csv file type.

  • --deanonymize_cols, -z

    Specifies which columns in addition to the column containing query text to decrypt by identifying the column position. Column position is determined by counting from the left-most column, starting with 1. No default setting. Optional.

    Example:
    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -z 3,4,5
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -z specifies the column position of extra columns to be decrypted.

  • --dbvendor, -v

    Specifies the source database platform of the input file. No default setting. Required for anonymize and deanonymize operations on csv and sql files.

    Available values:

    • ACCESS
    • ANSI
    • DB2
    • FIREBIRD
    • GENERIC
    • GREENPLUM
    • HIVE
    • IMPALA
    • INFORMIX
    • MSSQL
    • MYSQL
    • NETEZZA
    • ORACLE
    • POSTGRESQL
    • SYBASE
    • TERADATA

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv ./csv_workload_file.csv -q 3 -v ORACLE 
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, and -v specifies the database vendor.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv --help
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. This credential is required to decrypt the file. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the decrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv ./csv_workload_file.csv -q 3 -v ORACLE -o ./decrypted_file.csv
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, -v specifies the database vendor, and -o specifies the location where the decrypted file is written.

  • --query_col_number, -q

    Specifies the position of the column containing query text.Column position is determined by counting from the left-most column, starting with 1. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize csv ./csv_workload_file.csv -q 3 -v ORACLE
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, csv specifies that the input file is a CSV file and its location, -q specifies the position of the column containing query text, and -v specifies the database vendor.

"ANONYMIZE" OPERATION ON "SQL" FILE TYPE

The following options are available when you specify the anonymize operation and the sql file type.

  • --dbvendor, -v

    Specifies the source database platform of the input file. No default setting. Required for anonymize and deanonymize operations on csv and sql files.

    Available values:

    • ACCESS
    • ANSI
    • DB2
    • FIREBIRD
    • GENERIC
    • GREENPLUM
    • HIVE
    • IMPALA
    • INFORMIX
    • MSSQL
    • MYSQL
    • NETEZZA
    • ORACLE
    • POSTGRESQL
    • SYBASE
    • TERADATA

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE 
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, and -v specifies the database vendor.

  • --errorfile, -e

    Specifies the location where the error output file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE -e ./error_output_file
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -e specifies the location of the error output file.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql --help
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. No default setting. Optional.

    Use this option for an anonymize operation when you want to use the same password to decrypt multiple files with the same .passkey file. For example, you might upload multiple semicolon-separated SQL files and associated table statistics and column statistics files. In this case, using only one .passkey file in the Navigator Optimizer UI is convenient.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the encrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE -o
      ./encrypted_file.csv
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -o specifies the location where the encrypted file is written.

  • --skip_identifiers, -t

    Specifies that no SQL identifiers are encrypted. For example, table names, column names, view names, database names, and aliases. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE -t
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -t specifies that no SQL identifiers are to be encrypted.

  • --skip_literals, -l

    Specifies that no literals are masked. Literals are the constant values or the fixed data values in SQL queries. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize sql ./sql_workload_file.sql -v ORACLE -l
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -l specifies that no literals are to be masked.

"DEANONYMIZE" OPERATION ON "SQL" FILE TYPE

The following options are available when you specify the deanonymize operation and the sql file type.

  • --dbvendor, -v

    Specifies the source database platform of the input file. No default setting. Required for anonymize and deanonymize operations on csv and sql files.

    Available values:

    • ACCESS
    • ANSI
    • DB2
    • FIREBIRD
    • GENERIC
    • GREENPLUM
    • HIVE
    • IMPALA
    • INFORMIX
    • MSSQL
    • MYSQL
    • NETEZZA
    • ORACLE
    • POSTGRESQL
    • SYBASE
    • TERADATA

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize sql ./sql_workload_file.sql -v ORACLE -k
                ./my_sql.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -k specifies the path to the passkey.file.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize sql --help
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. This credential is required to decrypt the file. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize sql ./sql_workload_file.sql -v ORACLE -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the decrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize sql ./sql_workload_file.sql -v ORACLE -o ./decrypted_file.csv
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, sql specifies that the input file is a semicolon-separated SQL file and its location, -v specifies the database vendor, and -o specifies the location where the decrypted file is written.

"ANONYMIZE" OPERATION ON "TABLE_STATS" FILE TYPE

The following options are available when you specify the anonymize operation and the table_stats file type.

  • --errorfile, -e

    Specifies the location where the error output file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize table_stats ./table_stats.log -e ./error_output_file
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and -e specifies where the error output file is written.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize table_stats --help
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. No default setting. Optional.

    Use this option for an anonymize operation when you want to use the same password to decrypt multiple files with the same .passkey file. For example, you might upload multiple semicolon-separated SQL files and associated table statistics and column statistics files. In this case, using only one .passkey file in the Navigator Optimizer UI is convenient.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize table_stats ./table_stats.log -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the encrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize table_stats ./table_stats.log -o ./encrypted_table_stats.log
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and -o specifies the location where the encrypted file is written.

"DEANONYMIZE" OPERATION ON "TABLE_STATS" FILE TYPE

The following options are available when you specify the deanonymize operation and the table_stats file type.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize table_stats --help
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. This credential is required to decrypt the file. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize table_stats ./table_stats.log -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the decrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize table_stats ./encrypted_table_stats.log -o ./decrypted_table_stats.log
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, table_stats specifies that the input file is a file containing table statistics and its location, and -o specifies the location where the decrypted file is written.

"ANONYMIZE" OPERATION ON "COLUMN_STATS" FILE TYPE

The following options are available when you specify the anonymize operation and the column_stats file type.

  • --errorfile, -e

    Specifies the location where the error output file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize column_stats ./column_stats.log -e ./error_output_file
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and -e specifies where the error output file is written.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize column_stats --help
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. No default setting. Optional.

    Use this option for an anonymize operation when you want to use the same password to decrypt multiple files with the same .passkey file. For example, you might upload multiple semicolon-separated SQL files and associated table statistics and column statistics files. In this case, using only one .passkey file in the Navigator Optimizer UI is convenient.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize column_stats ./column_stats.log -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the encrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar anonymize column_stats ./column_stats.log -o ./encrypted_column_stats.log
    

    Where -jar specifies the path to the Anonymizer JAR, anonymize specifies the encrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and -o specifies the location where the encrypted file is written.

"DEANONYMIZE" OPERATION ON "COLUMN_STATS" FILE TYPE

The following options are available when you specify the deanonymize operation and the column_stats file type.

  • --help

    Writes Anonymizer tool documentation for the specified operation and file type to the terminal window. No default setting.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize column_stats --help
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and --h specifies you want the tool help to be written to the terminal window.

  • --key, -k

    Specifies the path to a previously generated .passkey file. This credential is required to decrypt the file. No default setting. Required.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize column_stats ./column_stats.log -k ./my_password.passkey
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and -k specifies the path to the .passkey file.

  • --output, -o

    Specifies the location where the decrypted file is written. No default setting. Optional.

    Example:

    java -jar ./cloudera_anonymizer-0.3.jar deanonymize column_stats ./encrypted_column_stats.log -o ./decrypted_column_stats.log
    

    Where -jar specifies the path to the Anonymizer JAR, deanonymize specifies the decrypt operation, column_stats specifies that the input file is a file containing column statistics and its location, and -o specifies the location where the decrypted file is written.