You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/04/03 20:49:17 UTC
[GitHub] [incubator-superset] elicutler opened a new issue #7219: Charts
built off Snowflake only support uppercase metric labels
elicutler opened a new issue #7219: Charts built off Snowflake only support uppercase metric labels
URL: https://github.com/apache/incubator-superset/issues/7219
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Make sure these boxes are checked before submitting your issue - thank you!
- [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [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
0.31.1
### Expected results
Chart should render without error when metric is given a non-uppercase label.
### Actual results
Chart fails to render when metric is given a non-uppercase label.
Stacktrace is as follows:
```
Traceback (most recent call last):
File "/home/superset/superset/views/base.py", line 114, in wraps
return f(self, *args, **kwargs)
File "/home/superset/superset/views/core.py", line 1229, in explore_json
samples=samples,
File "/home/superset/superset/views/core.py", line 1160, in generate_json
payload = viz_obj.get_payload()
File "/home/superset/superset/viz.py", line 378, in get_payload
payload['data'] = self.get_data(df)
File "/home/superset/superset/viz.py", line 1231, in get_data
df = self.process_data(df)
File "/home/superset/superset/viz.py", line 1151, in process_data
values=self.metric_labels)
File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 5303, in pivot_table
margins_name=margins_name)
File "/usr/local/lib/python3.6/site-packages/pandas/core/reshape/pivot.py", line 61, in pivot_table
raise KeyError(i)
KeyError: 'my label'
```
### Steps to reproduce
1. Create a chart (I've reproduced this error with bar chart and line chart).
2. Add a metric to the chart under `Query` > `Metrics` in the chart UI.
3. Click on the created metric; this will open a new box, and at the top is a place to write a custom label for the metric. Provide the metric a non-uppercase label, e.g. `my label`.
4. Run the query.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org