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

sqlAlchemy Trino #2582

Closed
diegorogo96 opened this issue Sep 27, 2021 · 5 comments
Closed

sqlAlchemy Trino #2582

diegorogo96 opened this issue Sep 27, 2021 · 5 comments

Comments

@diegorogo96
Copy link

Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum https://discourse.gethue.com?
I haven't found anything related to this.

Describe the bug:
We are connecting Hue to Trino using sqlAlchemy so we can use an editor on Hue. This connection is working and most of the time the queries return the correct results, but some times (around a third of the times) instead of returning anything it simply returns this error: "Should be running if processing response"

image

This is the error that is displayed on the logs:

[27/Sep/2021 13:39:25 +0200] sql_alchemy ERROR Query Error
Traceback (most recent call last):
File "/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py", line 99, in decorator
return func(*args, **kwargs)
File "/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py", line 318, in check_status
if (self.options['url'].startswith('presto://') | self.options['url'].startswith('trino://')) and cursor and cursor.poll():
File "/usr/share/hue/build/env/lib/python3.8/site-packages/pyhive/presto.py", line 303, in poll
self._process_response(response)
File "/usr/share/hue/build/env/lib/python3.8/site-packages/pyhive/trino.py", line 113, in _process_response
assert self._state == self._STATE_RUNNING, "Should be running if processing response"
AssertionError: Should be running if processing response

Even if Hue displays an error, the query finishes correctly on Trino.

Steps to reproduce it?

Launch any query to Trino using the Hue editor.

Hue version or source? (e.g. open source 4.5, CDH 5.16, CDP 1.0...). System info (e.g. OS, Browser...).

We are using Hue version 4.10 from this Docker image: gethue/hue:20210908-140101
Trino version 361

Configuration on hue.ini:
[[[trino]]]
name = Trino
interface=sqlalchemy
options='{"url": "trino://xxx:8080/hive_local/default" , "has_impersonation": true}'

What do you think could be causing this error?
Thank you!

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity and is not "roadmap" labeled or part of any milestone. Remove stale label or comment or this will be closed in 5 days.

@sbbagal13
Copy link

Hi Team ,
I too facing same issue ? do we have any workaround for this
@diegorogo96 are you able to resolve it

@bjornalm bjornalm reopened this Jan 5, 2023
@bjornalm
Copy link
Collaborator

bjornalm commented Jan 5, 2023

@Harshg999 Any thoughts?

@github-actions github-actions bot removed the Stale label Jan 6, 2023
@github-actions
Copy link

github-actions bot commented Feb 5, 2023

This issue is stale because it has been open 30 days with no activity and is not "roadmap" labeled or part of any milestone. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Feb 5, 2023
@bjornalm bjornalm removed the Stale label Feb 9, 2023
@bjornalm bjornalm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
@bjornalm
Copy link
Collaborator

Looks like a duplicate of #3167

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

No branches or pull requests

3 participants