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

[Data Checks Improvement]: Optional strings that describe the test case #4872

Open
fbertsch opened this issue Jan 23, 2024 · 1 comment
Open

Comments

@fbertsch
Copy link
Collaborator

fbertsch commented Jan 23, 2024

What is the issue?

When there are multiple test cases, or complicated ones, it can take time to skim through and understand what the test case is accomplishing. If instead we included optional strings that printed out if the test failed, we could very easily understand what tests are doing and why they might have failed.

For example, I have the test:

#fail
{{ min_row_count(10000, "as_of_date = @submission_date") }}

If this fails, it will get an error like Min Row Count Error: 126 rows found, expected more than 10000 rows".

But if I had a string to define the test, I could annotate it in the code and in the failure:

#fail
{% set check_str="Each day should have more than 10k updated clients" %}
{{ min_row_count(10000, "as_of_date = @submission_date", check_str) }}

Which might fail with:

FAILED: Each day should have more than 10k updated clients
Min Row Count Error: 126 rows found, expected more than 10000 rows.

This would also help ID which min_row_count check failed, when I have multiple.

How can we reproduce the bug

No response

┆Issue is synchronized with this Jira Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant