Skip to content

get_query_statistics

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

Retrieves statistics on the planning and execution of a query.

Parameters:

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def get_query_statistics(
    self,
    query_id: "capo_lakeformation.types.get_query_statistics_request_query_id_string.GetQueryStatisticsRequestQueryIdString",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = 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.
    """

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

        output, http_response = (
            capo_lakeformation._operations.aws_lake_formation.get_query_statistics.get_query_statistics(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output