Skip to main content

query_executions

Creates, updates, deletes, gets or lists a query_executions resource.

Overview

Namequery_executions
TypeResource
Idaws.athena.query_executions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
query_executionsarrayInformation about a query execution.
unprocessed_query_execution_idsarrayInformation about the query executions that failed to run.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_query_executionselectregionReturns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.
get_query_executionselectregionReturns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.
list_query_executionsselectregionProvides a list of available query execution IDs for the queries in the specified workgroup. Athena keeps a query history for 45 days. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.

SELECT
query_executions,
unprocessed_query_execution_ids
FROM aws.athena.query_executions
WHERE region = '{{ region }}' -- required
;