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

Improve update_column validation for pii attribute #1226

Closed
npatki opened this issue Feb 2, 2023 · 0 comments
Closed

Improve update_column validation for pii attribute #1226

npatki opened this issue Feb 2, 2023 · 0 comments
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Feb 2, 2023

For SDV 1.0 (in progress)

Problem Description

The update_column method is used to update parts of the metadata that may be incorrect. This method should also do some validation to make sure the user does not provide invalid data (that will cause issues later).

When passing in pii, the method currently accepts any input:

metadata.update_column(
    'column_name': 'user_address',
    'sdtype': 'address',
    'pii': 'a_string_input_type'

Or

metadata.update_column(
    'column_name': 'user_address',
    'sdtype': 'address',
    'pii': 40.0

**

Expected behavior

Only True and False values are allowed for the pii attribute. If the user passes in an incorrect value, we should throw an error.

InvalidMetadataError: Parameter 'pii' is set to an invalid attribute (40.0). Expected a value of True or False.
@npatki npatki added the feature request Request for a new feature label Feb 2, 2023
@npatki npatki added this to the 1.0.0 milestone Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants