DynamoDBClient.execute_statement
rboto-dynamodb==0.4.0 · Service index · Types
Model summary (excerpt): This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL. For PartiQL reads ( SELECT statement), if the total number of processed items exceeds the maximum dataset size limit of 1 MB, the read stops and results are returned to the user as a LastEvaluatedKey value to continue the read in a subsequent operation. If the filter criteria in WHERE...
Install and imports
from rboto import DynamoDBClient
from collections.abc import Sequence
from rboto_dynamodb.types import (
AttributeValue,
ExecuteStatementOutput,
ReturnConsumedCapacity,
ReturnValuesOnConditionCheckFailure,
)
Signature
async def execute_statement(
*,
statement: str,
parameters: Sequence[AttributeValue] | None = None,
consistent_read: bool | None = None,
next_token: str | None = None,
return_consumed_capacity: ReturnConsumedCapacity | None = None,
limit: int | None = None,
return_values_on_condition_check_failure: ReturnValuesOnConditionCheckFailure | None = None,
) -> ExecuteStatementOutput: ...
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) |
|---|---|---|
statement |
Yes | The PartiQL statement representing the operation to run. |
parameters |
No | The parameters for the PartiQL statement, if any. |
consistent_read |
No | The consistency of a read operation. If set to true , then a strongly consistent read is used; otherwise, an eventually consistent read is used. |
next_token |
No | Set this value to get remaining results, if NextToken was returned in the statement response. |
return_consumed_capacity |
No | |
limit |
No | The maximum number of items to evaluate (not necessarily the number of matching items). If DynamoDB processes the number of items up to the limit while processing the results, it stops the operation and returns the matching values up to that point, along with a key in LastEvaluatedKey to apply in a subsequent operation so you can pick up where you left off. Also, if the processed dataset size... |
return_values_on_condition_check_failure |
No | An optional parameter that returns the item attributes for an ExecuteStatement operation that failed a condition check. There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed. |
Output
ExecuteStatementOutput.
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 |
|---|---|---|---|
items |
list[dict[str, AttributeValueOutput]] | None |
Always present | AttributeValueOutput |
next_token |
str | None |
Always present | — |
consumed_capacity |
ConsumedCapacityOutput | None |
Always present | ConsumedCapacityOutput |
last_evaluated_key |
dict[str, AttributeValueOutput] | None |
Always present | AttributeValueOutput |
| 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
AttributeValue, ExecuteStatementOutput, ReturnConsumedCapacity, ReturnValuesOnConditionCheckFailure
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.
No output stream.
Errors
Import from rboto_dynamodb.exceptions:
ConditionalCheckFailedError, DuplicateItemError, InternalServerError, ItemCollectionSizeLimitExceededError, ProvisionedThroughputExceededError, RequestLimitExceededError, ResourceNotFoundError, ThrottlingError, TransactionConflictError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.