Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated trino library throwing errors in pydruid #20043

Closed
3 tasks done
george-zubrienko opened this issue May 12, 2022 · 9 comments
Closed
3 tasks done

Deprecated trino library throwing errors in pydruid #20043

george-zubrienko opened this issue May 12, 2022 · 9 comments
Labels
#bug Bug report

Comments

@george-zubrienko
Copy link

george-zubrienko commented May 12, 2022

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.
@george-zubrienko george-zubrienko added the #bug Bug report label May 12, 2022
@george-zubrienko george-zubrienko changed the title Deprecated trino library causing issues with Chart Explore Deprecated trino library preventing Chart Explore from Dashboard May 12, 2022
@george-zubrienko george-zubrienko changed the title Deprecated trino library preventing Chart Explore from Dashboard Deprecated trino library throwing errors in pydruid May 12, 2022
@george-zubrienko
Copy link
Author

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 :(

@rusackas
Copy link
Member

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

@musicmuthu
Copy link

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

@kristysiu-finn
Copy link

kristysiu-finn commented Jun 22, 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

@alldoami
Copy link

alldoami commented Jul 5, 2022

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

@sfirke
Copy link
Contributor

sfirke commented Jul 20, 2022

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.

@rusackas
Copy link
Member

rusackas commented Feb 9, 2024

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

@sfirke
Copy link
Contributor

sfirke commented Feb 9, 2024

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.

@sfirke sfirke closed this as completed Feb 9, 2024
@musicmuthu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

6 participants