paginated_query_multiple_fields
Wrapper on the query_multiple_fields operation, that allows to easily perform paginated operation with an iterable instead of manually managing the pagination.
The query request's are being send as you call the records_paginator
Feel free to break out of the loop of the records_paginator, since the query requests are sent progressively only as you iterate over the records_paginator. This means that you call that you cannot calculate the length of records_paginator in order to know the number of records page to except.
You can also use manual pagination
Notice that the operation has support for the exclusive_start_key, and each item of the records_paginator is a tuple containing both the records_items and the query_metadata. This allows you to start you records_paginator at a specific point to resume from a previous query operation, and you can save the last_evaluated_key of the query_metadata's to continue your query operation later as detailed in Query pagination
#
ParametersProperty name | Required | Accepted types | Default | Description |
---|---|---|---|---|
index_name | No | str | primary_index name of table | The index_name of the primary or secondary index that will be used to find the record you want to perform the operation onto. |
key_value | YES | Any | - | The path expression to target the attribute to set/update in your record. See Field path selectors |
getters | YES | Dict[str, FieldGetter] | - | A dictionary with all the fields to retrieve, and the keys that will be used for the output you will receive. |
exclusive_start_key | NO | dict | None | The key object to start the query from. This is used in paginated queries, it should not be manually created but retrieved from the 'last_evaluated_key' attribute from the query_metadata of your previous query operation. |
pagination_records_limit | NO | int | None | The numbers of records to scan before paginating the query. If None, the query will execute until all records matching the key_value have been scanned, or when the retrieved fields from the records exceed 1MB. |
data_validation | NO | bool | True | Whether data validation from your table model should be applied on the retrieved data. |
#
AvailabilityTable | Available |
---|---|
DynamoDBBasicTable | ✅ |
DynamoDBCachingTable | ✅ |
ExternalDynamoDBApiBasicTable | ✅ |
ExternalDynamoDBApiCachingTable | ✅ |