-
Notifications
You must be signed in to change notification settings - Fork 33
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
Redshift avg
returning 1
or 0
#81
Comments
@stevenconnorg Hi! Thanks for reporting this. There is indeed a way to create a custom version of So, what we need here is a |
@stumelius -- thanks for the help! I've linked a PR that will add this functionality. Let me know if you need anything else from me atm! |
Hey there,
I seem to be having issues getting correct
avg
values returned in Redshift.When we try to get the
avg
of a binary metric, Redshift returns either1
or0
. Ideally, these metrics should be stored as aboolean
value; however, I think we'd still have an issue since the measure_avg casts to1
or0
for boolean values, instead of1.0
or0.0
.Related stackoverflow thread: Redshift Avg not returning decimals
Is there some way that we can something like this so it works in Redshift?:
Maybe create a different version of this macro to use only with the
dbt-redshift
adapter? I'm not sure how to do that, but would help in contributing with some guidance!The text was updated successfully, but these errors were encountered: