S3Client.select_object_content
rboto-s3==0.4.0 · Service index · Types
Model summary (excerpt): This operation is not supported for directory buckets. This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only...
Install and imports
from rboto import S3Client
from rboto_s3.types import (
ExpressionType,
InputSerialization,
OutputSerialization,
RequestProgress,
ScanRange,
SelectObjectContentOutput,
)
Signature
async def select_object_content(
*,
bucket: str,
key: str,
expression: str,
expression_type: ExpressionType,
input_serialization: InputSerialization,
output_serialization: OutputSerialization,
sse_customer_algorithm: str | None = None,
sse_customer_key: str | None = None,
sse_customer_key_md5: str | None = None,
request_progress: RequestProgress | None = None,
scan_range: ScanRange | None = None,
expected_bucket_owner: str | None = None,
) -> SelectObjectContentOutput: ...
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) |
|---|---|---|
bucket |
Yes | The S3 bucket. |
key |
Yes | The object key. |
expression |
Yes | The expression that is used to query the object. |
expression_type |
Yes | The type of the provided expression (for example, SQL). |
input_serialization |
Yes | Describes the format of the data in the object that is being queried. |
output_serialization |
Yes | Describes the format of the data that you want Amazon S3 to return in response. |
sse_customer_algorithm |
No | The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide . |
sse_customer_key |
No | The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide . |
sse_customer_key_md5 |
No | The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide . |
request_progress |
No | Specifies if periodic request progress information should be enabled. |
scan_range |
No | Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range. ScanRange may be used in the following ways: 50 100 - process only the records starting between the bytes 50... |
expected_bucket_owner |
No | The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied). |
Output
SelectObjectContentOutput.
Typed response mapping, accessed as response["field"].
| Field | Type | Presence | References |
|---|---|---|---|
payload |
AsyncIterator[SelectObjectContentEventStream] |
Always present | SelectObjectContentEventStream |
| 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
ExpressionType, InputSerialization, OutputSerialization, RequestProgress, ScanRange, SelectObjectContentOutput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
Output streams: SelectObjectContentOutput.
Consume with async for. Do not reuse a consumed stream.
Errors
No modeled service errors for this operation.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.