Skip to content

AthenaClient.start_query_execution

rboto-athena==0.4.0 · Service index · Types

Model summary (excerpt): Runs the SQL query statements contained in the Query . Requires you to have access to the workgroup in which the query ran. Running queries against an external catalog requires GetDataCatalog permission to the catalog. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide .

Install and imports

python -m pip install "rboto[athena]==0.4.0"
from rboto import AthenaClient
from collections.abc import Sequence
from rboto_athena.types import (
    EngineConfiguration,
    QueryExecutionContext,
    ResultConfiguration,
    ResultReuseConfiguration,
    StartQueryExecutionOutput,
)

Signature

async def start_query_execution(
    *,
    query_string: str,
    client_request_token: str | None = None,
    query_execution_context: QueryExecutionContext | None = None,
    result_configuration: ResultConfiguration | None = None,
    work_group: str | None = None,
    execution_parameters: Sequence[str] | None = None,
    result_reuse_configuration: ResultReuseConfiguration | None = None,
    engine_configuration: EngineConfiguration | None = None,
) -> StartQueryExecutionOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
query_string Yes The SQL query statements to be executed.
client_request_token No A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. An error is returned if a parameter, such as QueryString , has changed. A call to StartQueryExecution that uses a previous client request token returns the same...
query_execution_context No The database within which the query executes.
result_configuration No Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration .
work_group No The name of the workgroup in which the query is being started.
execution_parameters No A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.
result_reuse_configuration No Specifies the query result reuse behavior for the query.
engine_configuration No The engine configuration for the workgroup, which includes the minimum/maximum number of Data Processing Units (DPU) that queries should use when running in provisioned capacity. If not specified, Athena uses default values (Default value for min is 4 and for max is Minimum of 124 and allocated DPUs). To specify minimum and maximum DPU values for Capacity Reservations queries, the workgroup...

Output

StartQueryExecutionOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
query_execution_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

EngineConfiguration, QueryExecutionContext, ResultConfiguration, ResultReuseConfiguration, StartQueryExecutionOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_athena.exceptions:

InternalServerError, InvalidRequestError, TooManyRequestsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model