AWS Athena JDBC PreparedStatement

馋奶兔 提交于 2019-12-05 12:21:20
Fabsklo

Athena supports only SQL functions listed here Athena SQL functions which in turn are based on Functions and Operators Presto version 0.172 with the following list of Athena's SQL related limitations. Prepared statements can be used in the new version of Presto Presto Documentation. However, Athena does not support this new version yet. You can always write to the Athena support team to ask for the PREPARE function to be added.

jhorner

Currently, I don't think the Athena JDBC jar supports prepared statements with position variables. While using myBatis, the prepared statement variable #{variable} didn't work, while the string replacement ${variable} did.

  • select * from my_table where col = #{col} limit 10 didn't work
  • select * from my_table where col = ${col} limit 10 did work

I think the error occurs because the Athena SConnection object doesn't support position variables, but since I don't have the source, I can't verify.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!