Skip to content

get_table_objects

get_table_objects(
    database_name: NameString,
    table_name: NameString,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    transaction_id: Optional[TransactionIdString] = None,
    query_as_of_time: Optional[Timestamp] = None,
    partition_predicate: Optional[PredicateString] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[TokenString] = None,
) -> GetTableObjectsResponse

Returns the set of Amazon S3 objects that make up the specified governed table. A transaction ID or timestamp can be specified for time-travel queries.

Parameters:

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

    The catalog containing the governed table. Defaults to the caller’s account.

  • database_name (NameString) –

    The database containing the governed table.

  • table_name (NameString) –

    The governed table for which to retrieve objects.

  • transaction_id (Optional[TransactionIdString], default: None ) –

    The transaction ID at which to read the governed table contents. If this transaction has aborted, an error is returned. If not set, defaults to the most recent committed transaction. Cannot be specified along with QueryAsOfTime.

  • query_as_of_time (Optional[Timestamp], default: None ) –

    The time as of when to read the governed table contents. If not set, the most recent transaction commit time is used. Cannot be specified along with TransactionId.

  • partition_predicate (Optional[PredicateString], default: None ) –

    A predicate to filter the objects returned based on the partition keys defined in the governed table.

    • The comparison operators supported are: =, >, <, >=, <=

    • The logical operators supported are: AND

    • The data types supported are integer, long, date(yyyy-MM-dd), timestamp(yyyy-MM-dd HH:mm:ssXXX or yyyy-MM-dd HH:mm:ss"), string and decimal.

  • max_results (Optional[PageSize], default: None ) –

    Specifies how many values to return in a page.

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

    A continuation token if this is not the first call to retrieve these objects.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def get_table_objects(
    self,
    database_name: "capo_lakeformation.types.name_string.NameString",
    table_name: "capo_lakeformation.types.name_string.NameString",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
    transaction_id: Optional[
        "capo_lakeformation.types.transaction_id_string.TransactionIdString"
    ] = None,
    query_as_of_time: Optional[
        "capo_lakeformation.types.timestamp.Timestamp"
    ] = None,
    partition_predicate: Optional[
        "capo_lakeformation.types.predicate_string.PredicateString"
    ] = None,
    max_results: Optional["capo_lakeformation.types.page_size.PageSize"] = None,
    next_token: Optional[
        "capo_lakeformation.types.token_string.TokenString"
    ] = None,
) -> "capo_lakeformation.types.get_table_objects_response.GetTableObjectsResponse":
    """<p>Returns the set of Amazon S3 objects that make up the specified governed table. A transaction ID or timestamp can be specified for time-travel queries.</p>

    Args:
        catalog_id: <p>The catalog containing the governed table. Defaults to the caller’s account.</p>
        database_name: <p>The database containing the governed table.</p>
        table_name: <p>The governed table for which to retrieve objects.</p>
        transaction_id: <p>The transaction ID at which to read the governed table contents. If this transaction has aborted, an error is returned. If not set, defaults to the most recent committed transaction. Cannot be specified along with <code>QueryAsOfTime</code>.</p>
        query_as_of_time: <p>The time as of when to read the governed table contents. If not set, the most recent transaction commit time is used. Cannot be specified along with <code>TransactionId</code>.</p>
        partition_predicate: <p>A predicate to filter the objects returned based on the partition keys defined in the governed table.</p> <ul> <li> <p>The comparison operators supported are: =, >, <, >=, <=</p> </li> <li> <p>The logical operators supported are: AND</p> </li> <li> <p>The data types supported are integer, long, date(yyyy-MM-dd), timestamp(yyyy-MM-dd HH:mm:ssXXX or yyyy-MM-dd HH:mm:ss"), string and decimal.</p> </li> </ul>
        max_results: <p>Specifies how many values to return in a page.</p>
        next_token: <p>A continuation token if this is not the first call to retrieve these objects.</p>

    Raises:
        capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</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.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_lakeformation.errors.resource_not_ready_exception.ResourceNotReadyException: <p>Contains details about an error related to a resource which is not ready for a transaction.</p>
        capo_lakeformation.errors.transaction_canceled_exception.TransactionCanceledException: <p>Contains details about an error related to a transaction that was cancelled.</p>
        capo_lakeformation.errors.transaction_committed_exception.TransactionCommittedException: <p>Contains details about an error where the specified transaction has already been committed and cannot be used for <code>UpdateTableObjects</code>.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lakeformation.types.get_table_objects_request.GetTableObjectsRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.get_table_objects_response.GetTableObjectsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.get_table_objects

        output, http_response = (
            capo_lakeformation._operations.aws_lake_formation.get_table_objects.get_table_objects(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTableObjects")
    )
    input_: capo_lakeformation.types.get_table_objects_request.GetTableObjectsRequest = {
        "database_name": database_name,
        "table_name": table_name,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if transaction_id is not None:
        input_["transaction_id"] = transaction_id
    if query_as_of_time is not None:
        input_["query_as_of_time"] = query_as_of_time
    if partition_predicate is not None:
        input_["partition_predicate"] = partition_predicate
    if max_results is not None:
        input_["max_results"] = max_results
    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