2021/03/05 - Amazon Athena - 5 new api methods
Changes Adds APIs to create, list, update, and delete prepared SQL statements that have optional placeholder parameters. A prepared statement can use different values for these parameters each time it is run.
Updates a prepared statement.
See also: AWS API Documentation
Request Syntax
client.update_prepared_statement( StatementName='string', WorkGroup='string', QueryStatement='string', Description='string' )
string
[REQUIRED]
The name of the prepared statement.
string
[REQUIRED]
The workgroup for the prepared statement.
string
[REQUIRED]
The query string for the prepared statement.
string
The description of the prepared statement.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the prepared statements in the specfied workgroup.
See also: AWS API Documentation
Request Syntax
client.list_prepared_statements( WorkGroup='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The workgroup to list the prepared statements for.
string
A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
integer
The maximum number of results to return in this request.
dict
Response Syntax
{ 'PreparedStatements': [ { 'StatementName': 'string', 'LastModifiedTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PreparedStatements (list) --
The list of prepared statements for the workgroup.
(dict) --
The name and last modified time of the prepared statement.
StatementName (string) --
The name of the prepared statement.
LastModifiedTime (datetime) --
The last modified time of the prepared statement.
NextToken (string) --
A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
Creates a prepared statement for use with SQL queries in Athena.
See also: AWS API Documentation
Request Syntax
client.create_prepared_statement( StatementName='string', WorkGroup='string', QueryStatement='string', Description='string' )
string
[REQUIRED]
The name of the prepared statement.
string
[REQUIRED]
The name of the workgroup to which the prepared statement belongs.
string
[REQUIRED]
The query string for the prepared statement.
string
The description of the prepared statement.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes the prepared statement with the specified name from the specified workgroup.
See also: AWS API Documentation
Request Syntax
client.delete_prepared_statement( StatementName='string', WorkGroup='string' )
string
[REQUIRED]
The name of the prepared statement to delete.
string
[REQUIRED]
The workgroup to which the statement to be deleted belongs.
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves the prepared statement with the specified name from the specified workgroup.
See also: AWS API Documentation
Request Syntax
client.get_prepared_statement( StatementName='string', WorkGroup='string' )
string
[REQUIRED]
The name of the prepared statement to retrieve.
string
[REQUIRED]
The workgroup to which the statement to be retrieved belongs.
dict
Response Syntax
{ 'PreparedStatement': { 'StatementName': 'string', 'QueryStatement': 'string', 'WorkGroupName': 'string', 'Description': 'string', 'LastModifiedTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
PreparedStatement (dict) --
The name of the prepared statement that was retrieved.
StatementName (string) --
The name of the prepared statement.
QueryStatement (string) --
The query string for the prepared statement.
WorkGroupName (string) --
The name of the workgroup to which the prepared statement belongs.
Description (string) --
The description of the prepared statement.
LastModifiedTime (datetime) --
The last modified time of the prepared statement.