Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Issue 1325 #1328

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion data_validation/cli_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,9 @@ def cols_from_arg(concat_arg: str, client, table_obj: dict, query_str: str) -> l
format = args.format if args.format else "table"

# Get random row arguments. Only in row validations these attributes can be present.
use_random_rows = getattr(args, consts.CONFIG_USE_RANDOM_ROWS, False)
# Bad coding here, but keeping it so as not to introduce a breaking change. See
# consts.py Line 17 for a more detailed explanation.
use_random_rows = getattr(args, "use_random_row", False)
random_row_batch_size = getattr(args, consts.CONFIG_RANDOM_ROW_BATCH_SIZE, None)

# Get table list. Not supported in case of custom query validation
Expand Down
6 changes: 6 additions & 0 deletions data_validation/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@


# Configuration Fields
# These are all keys into the config dict. Where these values come from the command line, these would
# match with the command line argument - so --secret-manager-type value would be inserted with the
# 'secret_manager_type' key.
# This is true for the most part, except where a typo gets introduced, i.e. --use-random-row became use_random_rows
# Fixing this would be a breaking change. A future cleanup to prevent this would be to use
# f'--{config_constant.repl('_','-')}' as the name argument to argparse.
SOURCE_TYPE = "source_type"
SECRET_MANAGER_TYPE = "secret_manager_type"
SECRET_MANAGER_PROJECT_ID = "secret_manager_project_id"
Expand Down