GlueClient.get_partitions
rboto-glue==0.4.0 · Service index · Types
Model summary (excerpt): Retrieves information about the partitions in a table.
Install and imports
from rboto import GlueClient
from rboto_glue.types import (
AuditContext,
GetPartitionsOutput,
Segment,
)
Signature
async def get_partitions(
*,
database_name: str,
table_name: str,
catalog_id: str | None = None,
expression: str | None = None,
next_token: str | None = None,
segment: Segment | None = None,
max_results: int | None = None,
exclude_column_schema: bool | None = None,
transaction_id: str | None = None,
query_as_of_time: str | None = None,
audit_context: AuditContext | None = None,
) -> GetPartitionsOutput: ...
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) |
|---|---|---|
database_name |
Yes | The name of the catalog database where the partitions reside. |
table_name |
Yes | The name of the partitions' table. |
catalog_id |
No | The ID of the Data Catalog where the partitions in question reside. If none is provided, the Amazon Web Services account ID is used by default. |
expression |
No | An expression that filters the partitions to be returned. The expression uses SQL syntax similar to the SQL WHERE filter clause. The SQL statement parser JSQLParser parses the expression. Operators : The following are the operators that you can use in the Expression API call: = Checks whether the values of the two operands are equal; if yes, then the condition becomes true. Example: Assume... |
next_token |
No | A continuation token, if this is not the first call to retrieve these partitions. |
segment |
No | The segment of the table's partitions to scan in this request. |
max_results |
No | The maximum number of partitions to return in a single response. |
exclude_column_schema |
No | When true, specifies not returning the partition column schema. Useful when you are interested only in other partition attributes such as partition values or location. This approach avoids the problem of a large response by not returning duplicate data. |
transaction_id |
No | The transaction ID at which to read the partition contents. |
query_as_of_time |
No | The time as of when to read the partition contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with TransactionId . |
audit_context |
No |
Output
GetPartitionsOutput.
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 |
|---|---|---|---|
partitions |
list[PartitionOutput] | None |
Always present | PartitionOutput |
next_token |
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.
Related types
AuditContext, GetPartitionsOutput, Segment
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
client.paginators.get_partitions(...) accepts the same arguments and returns AsyncIterator[GetPartitionsOutput]. Direct calls return one page. Pages preserve the Output representation above.
Input cursors: next_token. Page-size argument: max_results.
No output stream.
Errors
Import from rboto_glue.exceptions:
EntityNotFoundError, FederationSourceError, FederationSourceRetryableError, GlueEncryptionError, InternalServiceError, InvalidInputError, InvalidStateError, OperationTimeoutError, ResourceNotReadyError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.