Skip to content

Commit

Permalink
fix: Issue 1325 (#1328)
Browse files Browse the repository at this point in the history
* Emergency fix to issue 1325

* fix: Issue 1325
  • Loading branch information
sundar-mudupalli-work authored Nov 11, 2024
1 parent ade6d79 commit dfe8b8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit dfe8b8b

Please sign in to comment.