-
Notifications
You must be signed in to change notification settings - Fork 503
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
not_constant may generate false positive if used with group_by_column #848
Comments
Hi team, There has been no response to this issue report despite me providing a PR to fix it. I was wondering if this repo is still maintained? |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Hi @dbeatty10 and team -- I'm puzzled by complete lack of interest to this ticket... I didn't get a single comment either here on in the PR. Is this package being maintained at all? |
Thanks for raising this PR @igor-lobanov-maersk ! Just now gave an initial review here: #849 (review) |
Describe the bug
not_constant generic test would generate a false positive if used with group_by_column and there is only one row within a group
Steps to reproduce
Test model:
Test schema.yml:
Run:
dbt test -m test
Expected results
Test passes, because if there is only one value in the group, it does not break the constancy rule.
Actual results
Test fails.
Context
To explain what I'm doing and where this might be useful to others. I am flattening a nested array, and setting a flag if a given record is the first one. I wanted to add a test to make sure this logic always works, because I'm relying on this flag to be true exactly once for each id of the original record. In some cases there is only one element in the array, which gets the flag set to true correctly, but the test thinks it's wrong.
Screenshots and log output
Not sure what else would help.
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
Dremio
The output of
dbt --version
:Are you interested in contributing the fix?
PR provided #849
The text was updated successfully, but these errors were encountered: