apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform

Home Page:https://superset.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated trino library throwing errors in pydruid

george-zubrienko opened this issue · comments

How to reproduce the bug

  1. Create any chart using Trino data source and place it on a dashboard.
    0a. Install trino==0.313.0 instead of sqlalchemy-trino (deprecated) in superset image. Check that trino queries still work as expected.

Expected results

Non-deprecated trino library can be used w/o warnings from pydruid.

Actual results

Superset node prints:

Unable to load SQLAlchemy dialect <class 'pydruid.db.sqlalchemy.DruidHTTPSDialect'>: No module named 'sqlalchemy_trino'
2022-05-12 12:19:30,808:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect <class 'pydruid.db.sqlalchemy.DruidHTTPSDialect'>: No module named 'sqlalchemy_trino'

Environment

  • browser type and version: Chrome Version 101.0.4951.54 (Official Build) (64-bit)
  • superset version: 1.5.0 (dockerhub image) via helm 0.6.1
  • python version: python --version
superset@superset-6c55865fd6-vtv7k:/app$ python --version
Python 3.8.12
  • node.js version: node -v: N/A
  • any feature flags active:
FEATURE_FLAGS = {
    'ENABLE_TEMPLATE_PROCESSING': True
}

and

SQL_VALIDATORS_BY_ENGINE = {
    'presto': 'PrestoDBSQLValidator'
}

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

We did a bit of a digging here and this doesn't seem to be related to Chart Explore bug. However, still leaving the issue open as we have to keep legacy sqlalchemy-trino in superset image to get rid of this pydruid warning.

Renamed the issue and updated issue description. Sorry for the mess :(

Pinging @betodealmeida and @john-bodley in case either of you know a particularly elegant solution to this.

commented

same issue i pick the latest image 01-06-2022

I still see the same Chart Explore bug in 1.5.1:

  1. Go to that dashboard
  2. Click on three dots on the chart widget to open up chart actions
  3. Click View chart in Explore
  4. See An error occurred while opening Explore

same with copy chart permalink.

The error I see on the frontend console is that the POST request returns a 403:
image

I'm also seeing this error:

 superset 2022-07-05 17:11:38,020:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.mssql.adodbapi.MSDialect_adodbapi'>: type object 'MSDialect_adodbapi' has no  │
│ attribute 'dbapi'                                                                                                                                                                                  │
│ superset 2022-07-05 17:11:38,043:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect <class 'pydruid.db.sqlalchemy.DruidHTTPSDialect'>: No module named 'sqlalchemy_trino'          │
│ s

I see a similar warning message in my Superset logs, even though I don't use Druid or Trino at all. Doesn't seem to be affecting the actual performance of my Superset instance but mitigating this would clean up the logs. Superset v1.5.1.

Are people still seeing this in Superset 3.0/3.1? This thread has been quiet for an awfully long time.

I just reviewed a chunk of application logs from today on my production instance (running 3.0.1) and am not seeing this message anymore. That part, at least, seems to be addressed. I'll close this issue, if anyone is experiencing this problem in version >=3.0.3 of Superset please report with a new bug report and link back to this one.

commented

i have the same issue now in 3.1.1

Unable to load SQLAlchemy dialect <class 'pydruid.db.sqlalchemy.DruidHTTPSDialect'>: No module named 'google'
2024-04-30 14:57:22,628:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect <class 'pydruid.db.sqlalchemy.DruidHTTPSDialect'>: No module named 'google

my additional bootstrap:
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* &&
pip install authlib==1.0.1
psycopg2==2.8.5 elasticsearch-dbapi==0.2.9 trino==0.321.0 cx_Oracle==8.3.0 gevent &&
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid 0" > ~/bootstrap; fi