in data_validation/cli_tools.py [0:0]
def _configure_column_parser(column_parser):
"""Configure arguments to run column level validations."""
# Group optional arguments
optional_arguments = column_parser.add_argument_group("optional arguments")
optional_arguments.add_argument(
"--count",
"-count",
help="Comma separated list of columns for count 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--sum",
"-sum",
help="Comma separated list of columns for sum 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--avg",
"-avg",
help="Comma separated list of columns for avg 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--min",
"-min",
help="Comma separated list of columns for min 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--max",
"-max",
help="Comma separated list of columns for max 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--bit_xor",
"-bit_xor",
help="Comma separated list of columns for hashing a concatenate 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--std",
"-std",
help="Comma separated list of columns for standard deviation 'col_a,col_b' or * for all columns",
)
optional_arguments.add_argument(
"--grouped-columns",
"-gc",
help="Comma separated list of columns to use in GroupBy 'col_a,col_b'",
)
optional_arguments.add_argument(
"--exclude-columns",
"-ec",
action="store_true",
help="Flag to indicate the list of columns should be excluded from validation and not included.",
)
optional_arguments.add_argument(
"--threshold",
"-th",
type=threshold_float,
default=0.0,
help="Float max threshold for percent difference",
)
optional_arguments.add_argument(
"--filters",
"-filters",
type=get_filters,
default=[],
help="Filters in the format source_filter:target_filter",
)
optional_arguments.add_argument(
"--wildcard-include-string-len",
"-wis",
action="store_true",
help="Include string fields for wildcard aggregations.",
)
optional_arguments.add_argument(
"--wildcard-include-timestamp",
"-wit",
action="store_true",
help="Include timestamp/date fields for wildcard aggregations.",
)
optional_arguments.add_argument(
"--cast-to-bigint",
"-ctb",
action="store_true",
help="Cast any int32 fields to int64 for large aggregations.",
)
# Group required arguments
required_arguments = column_parser.add_argument_group("required arguments")
required_arguments.add_argument(
"--tables-list",
"-tbls",
default=None,
required=True,
help="Comma separated tables list in the form 'schema.table=target_schema.target_table'. Or shorthand schema.* for all tables.",
)
_add_common_arguments(optional_arguments, required_arguments)