Comments (6)
super - that works well here - saves a load of time figuring out what's wrong :-)
from pyathenajdbc.
I think that the difference in error message may be due to the difference in version of JDBC driver.
The correspondence of JDBC driver version is as follows.
version | JDBC driver version |
---|---|
v1.1.1 | AthenaJDBC41-1.0.1 |
v1.3.1 | AthenaJDBC41-1.1.0 |
Please let me know the table definition and the query where the error occurred.
Thanks,
from pyathenajdbc.
Gosh - that was fast! It looks like not the JDBC driver change:
I'm running this SQL:
select count(*) from speed_augmented_v2 where dt='2018-01-01' and client_code in %(app_list)s
Our wrapper didn't support lists (now fixed) so app_list was a string rather than list object which caused the SQL error.
On PyAthenaJDBC v1.1.1 (AthenaJDBC v1.0.1):
2018-02-15 14:21:53,640 ERROR Failed to execute query.
Traceback (most recent call last):
File "/Users/adrian/projects/os/data-athena/venv/lib/python3.6/site-packages/pyathenajdbc/cursor.py", line 117, in execute
result_set = self._statement.executeQuery(query)
jpype._jexception.java.sql.SQLExceptionPyRaisable: java.sql.SQLException: Failed to run query
2018-02-15 14:21:53,646 ERROR line 1:79: mismatched input 'in' expecting {<EOF>, 'GROUP', 'ORDER', 'HAVING', 'LIMIT', 'OR', 'AND', 'UNION', 'EXCEPT', 'INTERSECT'} (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: 91ff6d70-125b-11e8-a10f-e52a7edfa5db)
On PyAthenaJDBC v1.3.1 (AthenaJDBC v1.1.0):
2018-02-15 14:22:52,618 ERROR Failed to execute query.
Traceback (most recent call last):
File "/Users/adrian/projects/os/data-athena/venv/lib/python3.6/site-packages/pyathenajdbc/cursor.py", line 172, in execute
result_set = self._statement.executeQuery(query)
jpype._jexception.java.sql.SQLExceptionPyRaisable: java.sql.SQLException: Failed to run query
2018-02-15 14:22:52,706 ERROR java.sql.SQLException: Failed to run query
Now trying with the alternative JDBC drivers:
On PyAthenaJDBC v1.1.1 (AthenaJDBC v1.1.0):
2018-02-15 14:26:23,327 ERROR Failed to execute query.
Traceback (most recent call last):
File "/Users/adrian/projects/os/data-athena/venv/lib/python3.6/site-packages/pyathenajdbc/cursor.py", line 117, in execute
result_set = self._statement.executeQuery(query)
jpype._jexception.java.sql.SQLExceptionPyRaisable: java.sql.SQLException: Failed to run query
2018-02-15 14:26:23,333 ERROR line 1:79: mismatched input 'in' expecting {<EOF>, 'GROUP', 'ORDER', 'HAVING', 'LIMIT', 'OR', 'AND', 'UNION', 'EXCEPT', 'INTERSECT'} (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: 32b8e811-125c-11e8-a9cb-57f70b9cca77)
On PyAthenaJDBC v1.3.1 (AthenaJDBC v1.0.1):
2018-02-15 14:24:31,141 ERROR Failed to execute query.
Traceback (most recent call last):
File "/Users/adrian/projects/os/data-athena/venv/lib/python3.6/site-packages/pyathenajdbc/cursor.py", line 172, in execute
result_set = self._statement.executeQuery(query)
jpype._jexception.java.sql.SQLExceptionPyRaisable: java.sql.SQLException: Failed to run query
2018-02-15 14:24:31,237 ERROR java.sql.SQLException: Failed to run query
from pyathenajdbc.
Thank you for the quick reply.
I understand that it is not a difference in JDBC driver version.
Please also let me know the version of Python you are running.
I think that the implementation before change is somewhat dirty. I will think about the smart implementation by hand over the error information on the weekend.
Please tell me if you know something good implementation method :)
from pyathenajdbc.
File "/Users/adrian/projects/os/data-athena/venv/lib/python3.6/site-packages/pyathenajdbc/cursor.py", line 172, in execute
The execution environment is Python 3.6.
from pyathenajdbc.
Sorry for the late reply.
I fixed this issue with the following pull request. Please check it.
#55
Well, it has not changed much from the previous implementation 😂
Thanks,
from pyathenajdbc.
Related Issues (20)
- Return the Query ID after execute query in Athena (in 2020) HOT 6
- Deconflict on JPype.dbapi2
- _build_driver_args() should delegate to DefaultAWSCredentialsProviderChain by default HOT 3
- Issue connecting to Athena with multiple profiles, keys, and tokens if not "default" HOT 2
- How to use AwsCredentialsProviderArguments HOT 4
- Migrating from TravisCI to GitHubActions
- Support SQLAlchemy 1.4
- Update JDBC driver to 2.0.21
- how to use custom credential provider jar with sqlalchemy HOT 3
- PyAthena freezes or doesn't exit HOT 5
- log4j warnnings HOT 1
- New JDBC drivers HOT 6
- Athena is expecting an outputLocation ? HOT 1
- pip install PyAthenaJDBC fails jpype1 error on Windows 10 HOT 2
- Optimizing SQLAlchemy's `get_columns` HOT 4
- Illegal reflective access HOT 5
- Clarification regarding missing query metrics HOT 3
- Update JDBC driver to 2.0.9
- ImportError: numpy.core.multiarray failed to import
- Support China region Athena HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyathenajdbc.