Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Support China region Athena #97

Closed
liangruibupt opened this issue Apr 9, 2020 · 1 comment
Closed

Support China region Athena #97

liangruibupt opened this issue Apr 9, 2020 · 1 comment

Comments

@liangruibupt
Copy link

ERROR:

awsathena+jdbc URI error
superset_1         | DEBUG:pyathenajdbc.connection:JVM args: ['-server', '-Djava.class.path=/usr/local/lib/python3.6/site-packages/pyathenajdbc/AthenaJDBC42_2.0.9.jar', '-Dlog4j.configuration=file:/usr/local/lib/python3.6/site-packages/pyathenajdbc/log4j.properties']
superset_1         | ERROR:superset.views.core:Unexpected error java.sql.SQLException: [Simba][AthenaJDBC](100131) An error has been thrown from the AWS SDK client. Unable to execute HTTP request: athena.athena.cn-northwest-1.amazonaws.com.cn.amazonaws.com: Name or service not known [Execution ID not available]

FIX

update https://github.com/laughingman7743/PyAthenaJDBC/blob/master/pyathenajdbc/sqlalchemy_athena.py#L120 as below

'region_name': re.sub(r'^athena\.([a-z0-9-]+)\.amazonaws\.(com.cn|com)$', r'\1', url.host),

@laughingman7743 Please help fix the issue, I have tested in my project

https://github.com/liangruibupt/covid_19_report_end2end_analytics/blob/master/Athena-Superset-China.md

laughingman7743 added a commit that referenced this issue Apr 10, 2020
Support China(Ningxia) region endpoints (fix #97)
@laughingman7743
Copy link
Owner

@liangruibupt Thank you!
I just released a new version 2.0.7 to PyPI.
https://pypi.org/project/PyAthenaJDBC/2.0.7/

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

No branches or pull requests

2 participants