Usage

Provide options to PiiCatcher

PiiCatcher is invoked from the command line. It can take options from the command line or through a configuration file.

PiiCatcher functionality is organized into sub-commands. Sub-commands accept options specific to their functionality from the command-line or configuration files.

This document is also organized similarly. Common options are documented in this page. Sub-command options are documented in their respective pages.

Help

--help will provide help in the top-level or any sub-command context.

Configuration File Format

PiiCatcher uses ConfigObj to parse configuration files. Config files have to be in ini format. For more details refer to ConfigObj 5 documentation

Common options are specified at the top-level. Sub command options are specified in a section with same name as sub command.

For example, options for aws sub-command are specified as follows:

# Common option
log_level=INFO
[aws]
access_key="AX..."
secret_key="34Iyy&..."
region="us-east-2"

Common Options

OptionDefaultDescription
configNonePath to configuration file
log-levelWARNINGLogging Level
catalog-formatascii_tableThe format of the data catalog. ascii_table is output only format
catalog-fileNonePath to catalog file. Valid if catalog-format is json. Use if catalog has to be stored in a file.
catalog-hostNoneHostname of the database. Use if catalog has to be stored in a database
catalog-portNonePort of database. Use if catalog has to be stored in a database
catalog-userNoneUsername to connect database. Use if catalog has to be stored in a database
catalog-passwordNonePassword of the user. Use if catalog has to be stored in a database

Command Line

piicatcher --help
Usage: piicatcher [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--config FILE Read configuration from FILE.
-l, --log-level TEXT Logging Level
--catalog-format [ascii_table|json|db|glue]
Choose output format type
--catalog-file FILENAME File path of the catalog if format is json.
If not specified, then report is printed to
sys.stdout
--catalog-host TEXT Hostname of the database. Use if output is a
db
--catalog-port TEXT Port of database. Use if output is a db
--catalog-user TEXT Username to connect database. Use if output
is a db
--catalog-password TEXT Password of the user. Use if output is a db
--help Show this message and exit.
Commands:
aws
db
files
sqlite

Configuration File

log-level="..."
catalog_format="..."
catalog_file="..."
catalog_host="..."
catalog_port="..."
catalog_user="..."
catalog_password="..."