Sitelet https://github.com/GoogleCloudPlatform/cloud-data-quality/pull/193
Skip to content

Include star for ref columns - #193

Merged
AmandeepSinghCS merged 16 commits into
mainfrom
include-star-for-ref-columns
Oct 6, 2022
Merged

AmandeepSinghCS merged 16 commits into
mainfrom
include-star-for-ref-columns

Conversation

@AmandeepSinghCS

Copy link
Copy Markdown
Contributor

No description provided.

"column_id": self.column_id,
"reference_columns_id": self.reference_columns_id,
"include_reference_columns": include_reference_columns,
"include_all_reference_columns": include_all_reference_columns,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nauh I have added this in configs dictionary to identify the configs for job if it required all columns or no with this flag.

Comment thread clouddq/classes/dq_rule_binding.py Outdated
include_reference_columns = self.resolve_reference_columns_config(
configs_cache
).include_reference_columns
if include_reference_columns[0] == "*":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also check if the length of the include_reference_columns is 1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case we have both * and few other columns in reference columns section, I should raise an error or log a warning and continue with execution with including reference columns.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably better to raise an error if the list include "*" and other columns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree we should check and throw error if user include "*" and other columns

@thinhha thinhha Oct 3, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to have 3 conditions: * in include_reference_columns AND length=1, * in include_reference_columns AND length>1, else include columns

Comment thread clouddq/classes/dq_rule_binding.py Resolved
Comment on lines +30 to +36
CONTACT_DETAILS_ALL_REFERENCE_COLUMNS:
include_reference_columns:
- "*"

311_SERVICE_REQUESTS_ALL_REFERENCE_COLUMNS:
include_reference_columns:
- "*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should both of these reference IDs just be a single one called "INCLUDE_ALL_REFERENCE_COLUMNS"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorporated

@thinhha

thinhha commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

looks good thanks @AmandeepSinghCS . I have added a few comments.
Could we add some documentations and sample configs in ./configs/ in a separate PR

nauh
nauh previously approved these changes Oct 3, 2022
Comment thread clouddq/classes/dq_rule_binding.py Resolved
Comment thread clouddq/classes/dq_rule_binding.py Resolved

@thinhha thinhha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks Amandeep

@AmandeepSinghCS
AmandeepSinghCS merged commit 8a9083f into main Oct 6, 2022
@AmandeepSinghCS
AmandeepSinghCS deleted the include-star-for-ref-columns branch October 6, 2022 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants