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 error message for invalid constraints #801

Closed
amontanez24 opened this issue May 18, 2022 · 0 comments · Fixed by #807
Closed

Improve error message for invalid constraints #801

amontanez24 opened this issue May 18, 2022 · 0 comments · Fixed by #807
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@amontanez24
Copy link
Contributor

amontanez24 commented May 18, 2022

Problem Description

As a user, it would be helpful to know which rows failed the constraint if my data does not meet a constraint I specified.

Expected behavior

  • Augment the current error message that a user gets when their data fails constraint validation.
    • Print the first five rows that fail
    • If more than 5 rows fail print the number of extra rows as follows:: +X more
    • Only print the columns needed by the constraint
  • Change the way we validate constraints to catch all of the errors and surface them at once. Ie. instead of failing on the first invalid constraint, validate all of them and then surface those errors together

Here are some examples:

ConstraintsNotMetError: Data is not valid for the 'GreaterThan' constraint:
     parent_age       child_age
10   13               32
20   34               50
23   10               37
80   0                1
81   -1               50
+50 more
Data is not valid for the 'Unique' constraint:
     first_name       last_name
45   'Annie'          'Hall'
14   'Harry'          'Potter'
98   'Harry'          'Potter'
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

Successfully merging a pull request may close this issue.

3 participants