superset
superset copied to clipboard
[sqllab] Superset 3.0.0/ 3.0.3 not able to query with a Trino database though the databse connection is successfully created.
Bug description
Superset version 3.0.0 and 3.0.3 is not able to query with a Trino database though database connection has been created successfully.
Note : It was working perfect in Superset version 1.5.2
Attached with the screenshots.
How to reproduce the bug
In superset 3.0.0, 3.0.3
- Go to sql lab.
- select the database (trino database)
- Run a query in SQL-Lab
Screenshots/recordings
Working in Superset:1.5.2
Error in Superset 3.0.3,
Both of the instance is having exactly the same database connection for Trino.
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@michael-s-molina : The issue woth presto connection got fixed with the fix provided in : https://github.com/apache/superset/pull/26782 Thanks.
But with the Trino connection the issue is still there:
With Query:
Is there any fix for the Trino issue?
Is there any fix for trino issue? @rusackas
Is there any fix for trino issue? @rusackas
Nope! Please feel free to investigate and contribute one if you're able/willing!
CC'ing folks from the rolodex in case they have any insight here: @giftig @sujiplr @nytai @cccs-tom @villebro
Also note that officially we only support 3.1 and 4.0 now. Has anyone repro'd this issue in the newer/supported versions?
I asked our my team and no one seems to remember ever seeing this error in our deployments. But they also pointed out to me that we never did deploy Superset 3.0, we jumped straight to 3.1. So it may very well be fixed in later versions (or this is an edge case that we simply haven't encountered).
@cccs-tom : Thanks for your reply. As per your comments I tried it in superset-3.1.2 but still I am facing the issue. Meanwhile, Could you please get me the the details that you are providing in the trino database connection in Superset UI so that I can follow the same?
The requirements.txt file that i am using is: alembic==1.12.0 amqp==5.1.1 apache-superset==3.1.2 apispec==6.3.0 async-timeout==4.0.3 attrs==23.1.0 Babel==2.13.0 backoff==2.2.1 bcrypt==4.0.1 billiard==4.1.0 blinker==1.6.3 Brotli==1.1.0 #cachelib==0.8.0 cachelib==0.9.0 celery==5.3.4 certifi==2023.7.22 cffi==1.16.0 click==8.1.7 click-didyoumean==0.3.0 click-option-group==0.5.6 click-plugins==1.1.1 click-repl==0.3.0 colorama==0.4.6 convertdate==2.4.0 cron-descriptor==1.4.0 croniter==1.4.1 #cryptography==39.0.2 cryptography==42.0.4 Deprecated==1.2.14 deprecation==2.1.0 dnspython==2.4.2 email-validator==1.3.1 exceptiongroup==1.1.3 Flask==2.3.3 #Flask-AppBuilder==4.3.7 Flask-AppBuilder==4.4.1 Flask-Babel==2.0.0 #Flask-Caching==1.11.1 Flask-Caching==2.1.0 Flask-Compress==1.14 Flask-JWT-Extended==4.5.3 Flask-Login==0.6.2 Flask-LDAP==0.1.5 Flask-Migrate==3.1.0 Flask-SQLAlchemy==2.5.1 flask-talisman==1.1.0 Flask-WTF==1.2.1 Flask-SimpleLDAP==1.3.3 func-timeout==4.3.5 geographiclib==2.0 python-ldap==3.3.1 geopy==2.4.0 gevent==23.9.1 greenlet==3.0.0 #gunicorn==20.1.0 gunicorn==21.2.0 h11==0.14.0 hashids==1.3.1 hijri-converter==2.3.1 #holidays==0.23 holidays==0.25 humanize==4.8.0 idna==3.4 importlib-metadata==6.8.0 importlib-resources==6.1.0 isodate==0.6.1 itsdangerous==2.1.2 Jinja2==3.1.2 jsonschema==4.19.1 jsonschema-specifications==2023.7.1 kombu==5.3.2 korean-lunar-calendar==0.3.1 limits==3.6.0 Mako==1.2.4 Markdown==3.5 markdown-it-py==3.0.0 MarkupSafe==2.1.3 marshmallow==3.20.1 marshmallow-sqlalchemy==0.26.1 mdurl==0.1.2 msgpack==1.0.7 mysqlclient==2.1.0 nh3==0.2.14 numpy==1.23.5 ordered-set==4.1.0 outcome==1.2.0 packaging==21.3 #pandas==1.5.3 pandas==2.0.3 #paramiko==3.3.1 paramiko==3.4.0 parsedatetime==2.6 pgsanity==0.2.9 Pillow==10.0.1 polyline==2.0.1 prison==0.2.1 prompt-toolkit==3.0.39 #pyarrow==12.0.1 pyarrow==14.0.1 pycparser==2.21 Pygments==2.16.1 PyJWT==2.8.0 PyMeeus==0.5.12 PyNaCl==1.5.0 pyparsing==3.1.1 PySocks==1.7.1 python-dateutil==2.8.2 python-dotenv==1.0.0 python-geohash==0.8.5 pytz==2023.3.post1 PyYAML==6.0.1 redis==4.6.0 referencing==0.30.2 rich==13.6.0 rpds-py==0.10.4 selenium==4.9.1 shortid==0.1.2 simplejson==3.19.2 six==1.16.0 slack-sdk==3.23.0 sniffio==1.3.0 sortedcontainers==2.4.0 SQLAlchemy==1.4.49 SQLAlchemy-Utils==0.38.3 sqlparse==0.4.4 sshtunnel==0.4.0 tabulate==0.8.10 trio==0.22.2 trio-websocket==0.11.1 typing_extensions==4.8.0 tzdata==2023.3 #urllib3==2.0.6 urllib3==2.2.1 vine==5.0.0 wcwidth==0.2.8 Werkzeug==2.3.7 wrapt==1.15.0 wsproto==1.2.0 WTForms==3.0.1 WTForms-JSON==0.3.5 XlsxWriter==3.0.9 zipp==3.17.0 zope.event==5.0 zope.interface==6.1 environs==9.3.3 PyHive[presto]==0.6.4 pydruid==0.6.2 elasticsearch-dbapi==0.2.10 thrift==0.16.0 trino==0.328.0 requests==2.31.0 requests-kerberos==0.14.0 pykerberos==1.2.4 pipdeptree==2.10.0
Do you have any suggestion to modify the pkg versions?
Thanks in advance
Absolutely, but there really isn't much to it!
Under SQLAlchemy URI, we have the catalog URI (Superset and Trino both live in the same k8s cluster):
trino://trino.trino:8443/catalog_name
And then under ADVANCED -> Other -> ENGINE PARAMETERS, we have this simple JSON blob:
{"connect_args":{"source":"Superset (prod)","http_scheme":"https"}}
Actually, now that I think about it, I may remember having to change that JSON blob between Superset 1.x and 2.x. Since you're jumping straight from 1.5.2 to 3.x, that may be your issue here.
Hi @cccs-tom , @rusackas : Thanks for your support my issue got solved. Now I am able to query with Trino database connection.
The issue was with my trino version. I user trino[sqlalchemy] instead of trino. It worked.
Thanks