-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support connection parameters, execute non-prepared statements #26
Conversation
3 similar comments
2 similar comments
1 similar comment
2 similar comments
4 similar comments
1 similar comment
Thank you for your pull request. Regarding the "non-prepared statements" aspect: Do I get it right, that if you don't pass any parameters the statement won't be prepared and otherwise it will be prepared? If so, how do you pass parameters to AWS Athena then? |
Hey @baztian, that was my intention, yep. It's a pretty broad change, so not too sure how you'd feel about it. But, at the moment, it's not possible to use jaydebeapi with JDBC drivers that don't support prepared statements. Rather than create a separate 'execute'-type method for non-prepared statements, it seemed like a good technical fit to only use prepared statements when there were properties supplied? The Athena JDBC driver doesn't support prepared statements; though maybe it will in the future. We've had issues with prepared statements in the AWS Hive JDBC driver too. |
I know that coveralls is failing on this branch, but I'm not too sure where I could add further tests to increase coverage. New functionality is tested. But, the fact that I'm adding code to init.py decreases coverage overall. |
Regarding the connection parameters I'm working on a branch |
Starting with 1.0.0 connection parameters are supported. |
Thanks, @baztian! I'll review your changes and submit another pull request in the near future with your recommended implementation re prepared vs non-prepared statements. |
Closing as it is superseded by #29 |
This pull request enables using the AWS Athena JDBC driver, which requires certain properties passed at connection time, and does not support prepared statements.
Code for connection properties is appropriated from @Melraidin.
It will, by default, execute queries as standard statements, unless properties (including an empty parameter set) are passed into the execute function.