Convenience wrapper for consuming a ReadRows streaming response.
Parameters
Name
Description
read_method
client._table_data_client.read_rows
ReadRows method.
request
data_messages_v2_pb2.ReadRowsRequest
The ReadRowsRequest message used to create a ReadRowsResponse iterator. If the iterator fails, a new iterator is created, allowing the scan to continue from the point just beyond the last successfully read row, identified by self.last_scanned_row_key. The retry happens inside of the Retry class, using a predicate for the expected exceptions during iteration.
retry
google.api_core.retry.Retry
(Optional) Retry delay and deadline arguments. To override, the default value DEFAULT_RETRY_READ_ROWS can be used and modified with the google.api_core.retry.Retry.with_delay method or the google.api_core.retry.Retry.with_deadline method.
Properties
state
DEPRECATED: this property is deprecated and will be removed in the
future.
Methods
__iter__
__iter__()
Consume the ReadRowsResponse s from the stream.
Read the rows and yield each to the reader
Parse the response and its chunks into a new/existing row in
_rows. Rows are returned in order by row key.
cancel
cancel()
Cancels the iterator, closing the stream.
consume_all
consume_all(max_loops=None)
Consume the streamed responses until there are no more.
Parameter
Name
Description
max_loops
int
(Optional) Maximum number of times to try to consume an additional ReadRowsResponse. You can use this to avoid long wait times.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[]]