-
Notifications
You must be signed in to change notification settings - Fork 58
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
The data_quality__eligibility_death_flag
check causes a comparison error when run on PostgreSQL
#553
Comments
@BuzzCutNorman do you know if this is still an issue? |
Just checked 0.12.2 without a work around and got the same error:
|
Hi @sarah-tuva and team 👋 I think this issue may be rearing its head again for Redshift users as Redshift does not allow for casting from boolean to text/varchar ex:
returns
Any other thoughts for how we can address this aside from having our boolean columns be varchar with 1/0 values? |
Thanks for letting us know that this is still a problem. I am reopening the issue. I figured out why this was not caught in CI/CD. Our test dataset has death_flag stored as an integer rather than a boolean. Potential fix for this is to cast the flag as an integer first and then string.
|
Describe the bug - Required
The
data_quality__eligibility_death_flag
check causes a comparison error when run on PostgreSQL. PostgreSQL will only allow boolean to be compared with data types of boolean and str. Here is a link that explains in more detail.https://www.postgresql.org/docs/current/datatype-boolean.html
I am also assuming that in the input layer eligibility definition that boolean mean the boolean type for the datawarehouse platform. Looking at the query for the death flag check I could have assumed incorrectly, and I should be converting the boolean columns to int of only 1 or 0.
Environment - Required
To Reproduce
Steps to reproduce the behavior:
I executed
dbt run
withclaims_enabled: true
set in thedbt_project.yml
:Expected behavior
The data quality checks would run without encountering any PostgreSQL operator errors..
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
The text was updated successfully, but these errors were encountered: