-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
KeyError when using Redshift #5308
Comments
This sounds a lot like a similar problem with Snowflake/Oracle that was fixed in PR #4994. Can you try to manually lowercasing the metric name from |
Yea manually lowering the case will fix it. Where can I find the Snowflake/Oracle spec? I'll try to push a fix |
Just copy the following lines from under the snowflake spec to the redshift one, that should do the trick. If it works put through a PR. |
Thanks, @villebro. I tested it out and it worked beautifully, I pushed up a PR. |
Merged the PR, closing issue |
Hi does it seem like this merge got clobbered :: a165aec#diff-6519edc75f2440a575cb22492f401100? |
I'm trying to create line charts and time series charts with aggregates. In this case, I am summing up the column items sales over a date,
day
. However I keep getting this error- [ x] I have checked the superset logs for python stacktraces and included it here as text if any
A bit of digging saw that the column names become lower case when turned into a pandas data frame but the metric name is still capitalized, as shown by my logs above. I've set a trace and it's exactly what I expected
The error occurred at line 578
Make sure these boxes are checked before submitting your issue - thank you!
- [ x] I have reproduced the issue with at least the latest released version of superset
- [ x] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
superset==0.25.6
Expected results
I expect either the metrics to be all lower cased or that the column names of the results dataframe to match the form as the aggregate query
Actual results
The data frame has their column name lower cased and the metrics still retain the formatting.
Steps to reproduce
This is used on test data with a random numeric generator. I have seen this error in every case where I am using the SUM aggregation. The database is on Redshift and I have confirmed that I am using pandas==0.22.0.
I can push a fix to make the metrics lower cased or have the column name of the data frame match the metric but I'm not sure if that is the best way to approach this.
The text was updated successfully, but these errors were encountered: