Skip to content

get_partition_indexes

get_partition_indexes(
    database_name: NameString,
    table_name: NameString,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    next_token: Optional[Token] = None,
) -> GetPartitionIndexesResponse

Retrieves the partition indexes associated with a table.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The catalog ID where the table resides.

  • database_name (NameString) –

    Specifies the name of a database from which you want to retrieve partition indexes.

  • table_name (NameString) –

    Specifies the name of a table for which you want to retrieve the partition indexes.

  • next_token (Optional[Token], default: None ) –

    A continuation token, included if this is a continuation call.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def get_partition_indexes(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
    next_token: Optional["capo_glue.types.token.Token"] = None,
) -> "capo_glue.types.get_partition_indexes_response.GetPartitionIndexesResponse":
    """<p>Retrieves the partition indexes associated with a table.</p>

    Args:
        catalog_id: <p>The catalog ID where the table resides.</p>
        database_name: <p>Specifies the name of a database from which you want to retrieve partition indexes.</p>
        table_name: <p>Specifies the name of a table for which you want to retrieve the partition indexes.</p>
        next_token: <p>A continuation token, included if this is a continuation call.</p>

    Raises:
        capo_glue.errors.conflict_exception.ConflictException: <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.get_partition_indexes_request.GetPartitionIndexesRequest]",
    ) -> OperationResponse[
        "capo_glue.types.get_partition_indexes_response.GetPartitionIndexesResponse"
    ]:
        import capo_glue._operations.aws_glue.get_partition_indexes

        output, http_response = (
            capo_glue._operations.aws_glue.get_partition_indexes.get_partition_indexes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPartitionIndexes")
    )
    input_: capo_glue.types.get_partition_indexes_request.GetPartitionIndexesRequest = {
        "database_name": database_name,
        "table_name": table_name,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output