2

我是超集的新手。转到 Sources > Databases 以建立与我的 athena 的新连接。

我已经下载了 JDBC 驱动程序并编写了以下连接线:

awsathena+jdbc://AKIAJ2PKWTZYAPBYKRMQ:xxxxxxxxxxxxxxx@athena.us-east-1.amazonaws.com:443/default?s3_staging_dir='s3://aws-athena-query-results-831083831535-us-east-1/'作为 SQLAlchemy URI。第一个参数是访问密钥,第二个是密钥(为了隐私做了一些修改)

我收到错误消息:

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCan't load plugin: sqlalchemy.dialects:awsathena.jdbc"}

非常感谢您的支持,因为我真的希望在我的数据库上使用超集来探索开源可视化。

谢谢,拉维

4

3 回答 3

1

根据Superset 文档,您至少需要对 s3_staging_dir 进行转义/编码,即

s3://... -> s3%3A//...

你有没有遵循这一步?

于 2018-04-08T05:58:31.603 回答
1

如果您确定您已经pip install "PyAthenaJDBC>1.0.9"在启动超集时在同一个 python 环境中完成。尝试在相同的环境中重新启动 Superset。

于 2018-08-23T19:09:29.123 回答
0

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!

于 2020-02-19T10:55:17.003 回答