Reputation: 21
I'm trying to use the prepared statements added in athena engine version 2 using boto3. I see api docs for CreatePreparedStatement but nothing for executing the prepared statement https://docs.aws.amazon.com/athena/latest/APIReference/API_CreatePreparedStatement.html https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html
Upvotes: 2
Views: 2192
Reputation: 61
You just submit a SQL statement with Client.start_query_execution
Execute prepared_statement_name 'param1','param2', etc...
Upvotes: 1
Reputation: 7028
The boto3 Athena documentation does not specify an API to execute a prepared statement directly currently. A possible workaround would be to get the PreparedStatement object by calling get_prepared_statement(), extracting the query statement from the object, and run start_query_execution() with it.
Upvotes: 2