raghav5289 opened a new issue #9983:
URL: https://github.com/apache/incubator-superset/issues/9983


   ### Superset Version:
   Superset: 0.30.0
   Pydruid: 0.5.7
   
   ### Description:
   I'm trying to use the an extractionfn with registeredLookup to create a 
custom dimension. 
   ```
   {
       "type": "extraction",
       "dimension": "mt",
       "outputName": "MediaType",
       "outputType": "STRING",
       "extractionFn": {
           "type": "registeredLookup",
           "optimize": true,
           "lookup": "mt_lookup"
       }
   }
   ```
   I can see the lookup working perfectly when I use it to in my charts, but 
whenever I use it as part of a filter box, I get the `Exception: Unsupported 
extraction function: registeredLookup`.
   
   Following is the traceback:
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/dist-packages/superset/viz.py", line 415, 
in get_df_payload
       df = self.get_df(query_obj)
     File "/usr/local/lib/python3.6/dist-packages/superset/viz.py", line 200, 
in get_df
       self.results = self.datasource.query(query_obj)
     File 
"/usr/local/lib/python3.6/dist-packages/superset/connectors/druid/models.py", 
line 1356, in query
       query_str = self.get_query_str(client=client, query_obj=query_obj, 
phase=2)
     File 
"/usr/local/lib/python3.6/dist-packages/superset/connectors/druid/models.py", 
line 958, in get_query_str
       return self.run_query(client=client, phase=phase, **query_obj)
     File 
"/usr/local/lib/python3.6/dist-packages/superset/connectors/druid/models.py", 
line 1183, in run_query
       filters = DruidDatasource.get_filters(filter, self.num_cols, 
columns_dict)
     File 
"/usr/local/lib/python3.6/dist-packages/superset/connectors/druid/models.py", 
line 1446, in get_filters
       (col, extraction_fn) = DruidDatasource._create_extraction_fn(dim_spec)
     File 
"/usr/local/lib/python3.6/dist-packages/superset/connectors/druid/models.py", 
line 1422, in _create_extraction_fn
       raise Exception(_("Unsupported extraction function: " + ext_type))
   Exception: Unsupported extraction function: registeredLookup
   ```
   
   A previous 
[#5973](https://github.com/apache/incubator-superset/issues/5973), had a 
similar problem but couldn't figure out the issue. 
   
   
   Any leads would be quite helpful !
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to