I’m trying to connect to AWS Athena, so I edited hue.ini
file and added following entry:
[[[athena]]]
name=AWS Athena
interface=sqlalchemy
options='{"url": "awsathena+rest://XXXXXXXXXXX:YYYYYYYYYYYYYYY@athena.us-east-1.amazonaws.com:443/demo?s3_staging_dir=s3://hue-athena/scratch/"}'
I also installed PyAthena
package by running following command: ./build/env/bin/pip install PyAthena
When I’m in Hue, I can see databases however if I click on any of them or run the query I’m getting Unknown error occurred
message. This is what I see in the logs:
[16/Apr/2021 03:12:35 -0700] access INFO 172.17.0.1 admin - “POST /notebook/api/autocomplete/demo/ HTTP/1.1” returned in 5831ms 200 28
[16/Apr/2021 03:12:35 -0700] access INFO 172.17.0.1 admin - “POST /notebook/api/autocomplete/demo/ HTTP/1.1” returned in 5831ms 200 28
172.17.0.1 - - [16/Apr/2021:10:12:35 +0000] “POST /notebook/api/autocomplete/demo/ HTTP/1.1” 200 28 “http://localhost:8888/hue/editor/?type=athena” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”
[2021-04-16 10:28:02 +0000] [43] [DEBUG] Closing connection.
[2021-04-16 10:28:09 +0000] [43] [DEBUG] POST /notebook/api/autocomplete/default/
[16/Apr/2021 03:28:17 -0700] sql_alchemy ERROR Query Error
Traceback (most recent call last):
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 100, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 457, in autocomplete
for t in assist.get_view_names(database):
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 561, in get_view_names
return self.db.get_view_names(database)
File “/usr/share/hue/build/env/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py”, line 327, in get_view_names
self.bind, schema, info_cache=self.info_cache
File “/usr/share/hue/build/env/lib/python3.6/site-packages/sqlalchemy/engine/interfaces.py”, line 330, in get_view_names
raise NotImplementedError()
NotImplementedError
[16/Apr/2021 03:28:17 -0700] decorators ERROR Error running autocomplete
Traceback (most recent call last):
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 100, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 457, in autocomplete
for t in assist.get_view_names(database):
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 561, in get_view_names
return self.db.get_view_names(database)
File “/usr/share/hue/build/env/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py”, line 327, in get_view_names
self.bind, schema, info_cache=self.info_cache
File “/usr/share/hue/build/env/lib/python3.6/site-packages/sqlalchemy/engine/interfaces.py”, line 330, in get_view_names
raise NotImplementedError()
NotImplementedErrorDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/share/hue/desktop/libs/notebook/src/notebook/decorators.py”, line 119, in wrapper
return f(*args, **kwargs)
File “/usr/share/hue/desktop/libs/notebook/src/notebook/api.py”, line 753, in autocomplete
autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested, action)
File “/usr/share/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py”, line 117, in decorator
raise QueryError(message)
notebook.connectors.base.QueryError
[16/Apr/2021 03:28:17 -0700] access INFO 172.17.0.1 admin - “POST /notebook/api/autocomplete/default/ HTTP/1.1” returned in 8430ms 200 28
[16/Apr/2021 03:28:17 -0700] access INFO 172.17.0.1 admin - “POST /notebook/api/autocomplete/default/ HTTP/1.1” returned in 8430ms 200 28