Skip to content

get_query_statistics async

get_query_statistics(
    query_id: GetQueryStatisticsRequestQueryIdString,
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
) -> GetQueryStatisticsResponse

Retrieves statistics on the planning and execution of a query.

Parameters:

Raises:

Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
async def get_query_statistics(
    self,
    query_id: "capo_lakeformation.types.get_query_statistics_request_query_id_string.GetQueryStatisticsRequestQueryIdString",
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
) -> "capo_lakeformation.types.get_query_statistics_response.GetQueryStatisticsResponse":
    """<p>Retrieves statistics on the planning and execution of a query.</p>

    Args:
        query_id: <p>The ID of the plan query operation.</p>

    Raises:
        capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_lakeformation.errors.expired_exception.ExpiredException: <p>Contains details about an error where the query request expired.</p>
        capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_lakeformation.errors.statistics_not_ready_yet_exception.StatisticsNotReadyYetException: <p>Contains details about an error related to statistics not being ready.</p>
        capo_lakeformation.errors.throttled_exception.ThrottledException: <p>Contains details about an error where the query request was throttled.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lakeformation.types.get_query_statistics_request.GetQueryStatisticsRequest]",
    ) -> AsyncOperationResponse[
        "capo_lakeformation.types.get_query_statistics_response.GetQueryStatisticsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.get_query_statistics

        (
            output,
            http_response,
        ) = await capo_lakeformation._operations.aws_lake_formation.get_query_statistics.async_get_query_statistics(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetQueryStatistics")
    )
    input_: capo_lakeformation.types.get_query_statistics_request.GetQueryStatisticsRequest = {
        "query_id": query_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output