kkalyan opened a new issue #3908: Issue with Dimension Specs
URL: https://github.com/apache/incubator-superset/issues/3908
 
 
   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 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.26.0 on Mac. 
   this is something that worked fine on 0.19.1 
   
   ### Expected results
   Dimension Specs using lookup. 
   
   ### Actual results
   Exception in the explore screen. 
   
   "None of [[u'replaceMissingValueWith', u'outputName', u'lookup', u'type', 
u'dimension']] are in the [index]"
   
   Traceback (most recent call last):
     File "/usr/local/lib/python2.7/site-packages/superset/viz.py", line 275, 
in get_payload
       df = self.get_df()
     File "/usr/local/lib/python2.7/site-packages/superset/viz.py", line 98, in 
get_df
       self.results = self.datasource.query(query_obj)
     File 
"/usr/local/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1069, in query
       client=client, query_obj=query_obj, phase=2)
     File 
"/usr/local/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 865, in get_query_str
       return self.run_query(client=client, phase=phase, **query_obj)
     File 
"/usr/local/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1006, in run_query
       qry['dimensions'], filters)
     File 
"/usr/local/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 874, in _add_filter_from_pre_query_data
       f = Dimension(dim) == row[dim]
     File "/usr/local/lib/python2.7/site-packages/pandas/core/series.py", line 
642, in __getitem__
       return self._get_with(key)
     File "/usr/local/lib/python2.7/site-packages/pandas/core/series.py", line 
683, in _get_with
       return self.loc[key]
     File "/usr/local/lib/python2.7/site-packages/pandas/core/indexing.py", 
line 1328, in __getitem__
       return self._getitem_axis(key, axis=0)
     File "/usr/local/lib/python2.7/site-packages/pandas/core/indexing.py", 
line 1541, in _getitem_axis
       return self._getitem_iterable(key, axis=axis)
     File "/usr/local/lib/python2.7/site-packages/pandas/core/indexing.py", 
line 1081, in _getitem_iterable
       self._has_valid_type(key, axis)
     File "/usr/local/lib/python2.7/site-packages/pandas/core/indexing.py", 
line 1418, in _has_valid_type
       (key, self.obj._get_axis_name(axis)))
   KeyError: "None of [[u'replaceMissingValueWith', u'outputName', u'lookup', 
u'type', u'dimension']] are in the [index]"
   
   ### Steps to reproduce
   Create a dimension Spec 
   
   for eg: 
   ```
   { 
     "type":"lookup",
     "dimension":"device_type_id",
     "replaceMissingValueWith": "Unknown",
     "outputName":"device_type_id",
     "lookup":{"type": "map", "map":
        {"1":"Desktop", "2": "Phone","3":"Tablet","4":"ConnectedTv"}
        }
   }
   ```
   and run groupBy in the Explore view Table Visualization. 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to