Reputation: 21
I am new to superset. Going to Sources > Databases for a new connection to my athena.
I have downloaded JDBC driver and writing following connection line:
awsathena+jdbc://AKIAJ2PKWTZYAPBYKRMQ:[email protected]:443/default?s3_staging_dir='s3://aws-athena-query-results-831083831535-us-east-1/' as SQLAlchemy URI. First parameter being access key and 2nd being secret key(Modified a bit for privacy)
I am getting the error:
ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCan't load plugin: sqlalchemy.dialects:awsathena.jdbc"}
I really wish to explore the open source visualisation using superset on my databases.
Upvotes: 2
Views: 3253
Reputation: 13934
In my case problem was with the special characters in the aws_secret_key
and s3_staging_dir
. I solved it by putting the output of quote_plus
methods into the URI. No quotes were required.
from urllib.parse import quote_plus
secretkey = quote_plus(aws_secret_access_key)
loc = quote_plus(s3_staging_dir)
Further, make sure the schema_name (i.e. database name) already exists in the s3 path. Hope it helps!
Upvotes: 0
Reputation: 1388
If you are sure you have done pip install "PyAthenaJDBC>1.0.9"
in the same python environment as you start your superset. Try restarting Superset in the same environment.
Upvotes: 1
Reputation: 1783
As per Superset documentation, you need to escape/encode at least the s3_staging_dir, i.e.,
s3://... -> s3%3A//...
Have you followed that step?
Upvotes: 1