You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by "James Davidheiser (JIRA)" <ji...@apache.org> on 2019/01/11 23:53:00 UTC

[jira] [Created] (SUPERSET-6) case sensitivity breaks charts

James Davidheiser created SUPERSET-6:
----------------------------------------

             Summary: case sensitivity breaks charts
                 Key: SUPERSET-6
                 URL: https://issues.apache.org/jira/browse/SUPERSET-6
             Project: Superset
          Issue Type: Bug
            Reporter: James Davidheiser


We have an issue where, at some point, Superset is changing the case of some text, and this is causing Pandas to fail when trying to manipulate data to display a bar chart.  This is running in Redshift,

 

Steps to reproduce:
 * In SQL lab, run a query to join two tables and create a two-column view, with a label and numeric value
 * click the "explore" button to make a dataset from this.
 * select a bar chart visualization type
 * for metrics, choose MAX(column_name)
 * for series, chose the label column
 * run the query
 * click the menu to the top right, and view results.  The column headers will be label_column, and max(column_name)  _note:  max is now lowercase_

I am able to get the chart to render by manually modifying the SQL for the aggregation to be lowercase, or by creating a new metric in the datasource that is defined as max(column_name), already lowercase.

 

Error logs when this happens:

{{2019-01-11 23:48:53,894:DEBUG:root:[stats_logger] (incr) loaded_from_source}}
{{2019-01-11 23:48:53,894:INFO:root:Caching 2262 chars at key fa6d6a8327a9476c27477dcd624b1793}}
{{2019-01-11 23:48:53,894:DEBUG:root:[stats_logger] (incr) set_cache_key}}
{{2019-01-11 23:48:53,897:ERROR:root:'MAX(column_name)'}}
{{Traceback (most recent call last):}}
{{  File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3064, in get_loc}}
{{    return self._engine.get_loc(key)}}
{{  File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc}}
{{  File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc}}
{{  File "pandas/_libs/hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item}}
{{  File "pandas/_libs/hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item}}
{{KeyError: 'MAX(column_name)'}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)