Incubator-superset: Druid connector model fails

Created on 12 Jun 2019  路  3Comments  路  Source: apache/incubator-superset

After setting up a connection between superset and a druid cluster. (scan new datasources works fine), datasources are created, but when i want to explore them, or make a chart on them. I get an 500 - Internal Server Error.

AttributeError: 'NoneType' object has no attribute 'data'

        Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/superset/superset/models/core.py", line 1149, in wrapper
    value = f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 123, in wraps
    return f(self, *args, **kwargs)
  File "/home/superset/superset/views/core.py", line 1383, in explore
    'datasource': datasource.data,
  File "/home/superset/superset/connectors/base/models.py", line 192, in data
    'database': self.database.data,  # pylint: disable=no-member
AttributeError: 'NoneType' object has no attribute 'data'

Expected results

Being able to use a druid datasource like the normal SQL ones

Actual results

HTTP 500 Error

How to reproduce the bug

  1. Go to 'Sources'
  2. Click on 'Druid cluster'
  3. press 'Add new record'
  4. provide correct name and port. press 'Save'

  5. Go to 'Sources'

  6. press Scan new datasources
  7. click on one of the found datasources

Get the error

Environment

  • superset version: Superset 0.999.0dev
  • python version: Python 3.6.8
  • node.js version: v10.15.3
  • npm version: 6.4.1
  • druid version apache-druid-0.14.2-incubating

    Checklist

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.
#bug

Most helpful comment

I seem to be having the same issue using the docker image

Just to reiterate what @deity-bram is saying, you must enter something in the verbose field and the cluster

All 3 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.80. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

The problem was that the cluster_name was not set in the DBtable clusters and DBTable datasources.
Tried to reproduce the cluster creation steps, and got some strange results while trying to add or edit clusters.
cluster name is an input, but is not mandatory. After saving the provided name is not used. After deletion, and creating a new cluster, the old clustername is used.

I seem to be having the same issue using the docker image

Just to reiterate what @deity-bram is saying, you must enter something in the verbose field and the cluster

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thoralf-gutierrez picture thoralf-gutierrez  路  3Comments

lenguyenthedat picture lenguyenthedat  路  3Comments

vylc picture vylc  路  3Comments

dinhhuydh picture dinhhuydh  路  3Comments

amien90 picture amien90  路  3Comments