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

Grouped Column Validation does not accept (nor need) primary keys #982

Closed
sundar-mudupalli-work opened this issue Sep 12, 2023 · 3 comments · Fixed by #1082
Closed

Grouped Column Validation does not accept (nor need) primary keys #982

sundar-mudupalli-work opened this issue Sep 12, 2023 · 3 comments · Fixed by #1082
Labels
priority: p2 Medium priority. Fix may not be included in next release (e.g. minor documentation, cleanup) type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. type: docs

Comments

@sundar-mudupalli-work
Copy link
Contributor

Hi,

The documentation under validate column says --primary-keys or -pk PRIMARY_KEYS Comma separated list of columns to use as primary keys. However the command does not take (nor does it need) primary keys. The --grouped-columns flag alone is suffficient. I also took a look at the code - cli_tools.py and the function _configure_column_parser does not have primary key as an optional argument, while --grouped-columns is an optional argument.

data-validation validate column -sc=my_postgres -tc=my_postgres -tbls public.group_test_1=public.group_test_2 -pk=store_id,rev_month -gc=store_id,rev_month --sum revenue  --filter-status=fail
data-validation: error: unrecognized arguments: -pk=store_id,rev_month
data-validation validate column -sc=my_postgres -tc=my_postgres -tbls public.group_test_1=public.group_test_2  -gc=store_id,rev_month --sum revenue  --filter-status=fail
09/12/2023 02:10:12 AM-WARNING: Unknown cast types can cause memory errors
09/12/2023 02:10:12 AM-WARNING: Unknown cast types can cause memory errors
09/12/2023 02:10:12 AM-WARNING: Unknown cast types can cause memory errors
09/12/2023 02:10:12 AM-WARNING: Unknown cast types can cause memory errors
╒═══════════════════╤═══════════════════╤═════════════════════╤══════════════════════╤════════════════════╤════════════════════╤══════════════════╤═════════════════════╤══════════╕
│ validation_name   │ validation_type   │ source_table_name   │ source_column_name   │ source_agg_value   │ target_agg_value   │ pct_difference   │ validation_status   │ run_id   │
╞═══════════════════╪═══════════════════╪═════════════════════╪══════════════════════╪════════════════════╪════════════════════╪══════════════════╪═════════════════════╪══════════╡
╘═══════════════════╧═══════════════════╧═════════════════════╧══════════════════════╧════════════════════╧════════════════════╧══════════════════╧═════════════════════╧══════════╛

@sundar-mudupalli-work sundar-mudupalli-work added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Medium priority. Fix may not be included in next release (e.g. minor documentation, cleanup) type: docs labels Sep 12, 2023
@piyushsarraf
Copy link
Contributor

piyushsarraf commented Sep 25, 2023

Hi @sundar-mudupalli-work ,

In my testing, I was getting an explicit error stating that error: unrecognized arguments: -pk=dept_no,loc_name and DVT stopped execution, is the bug fixed?
image

If so, can we just edit the doc?

@sundar-mudupalli-work
Copy link
Contributor Author

Piyush,

Yes it still has to go through a pull request (I believe). Do you need this immediately ? - is this impacting a customer ?

I put it in the system and was planning to include both of the doc issues I found (982 and 983) on a upcoming PR.

Thanks.

Sundar Mudupalli

@piyushsarraf
Copy link
Contributor

@sundar-mudupalli-work

No, I was just looking on some open issues and wanted to contribute, so thought of asking for update.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Medium priority. Fix may not be included in next release (e.g. minor documentation, cleanup) type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. type: docs
Projects
None yet
2 participants