Module reader (2.25.0)

API documentation for bigquery_storage_v1.reader module.

Classes

ReadRowsIterable

ReadRowsIterable(reader, read_session=None)

An iterable of rows from a read session.

Parameters
Name Description
reader google.cloud.bigquery_storage_v1.reader.ReadRowsStream

A read rows stream.

read_session Optional[ReadSession]

This argument was used to specify the schema of the rows in the stream, but now the first message in a read stream contains this information. When row_restriction is applied, some streams may be empty without read_session info. Provide this argument to avoid an error. For more information, see https://github.com/googleapis/python-bigquery-storage/issues/733ß

ReadRowsPage

ReadRowsPage(stream_parser, message)

An iterator of rows from a read session message.

Parameters
Name Description
stream_parser google.cloud.bigquery_storage_v1.reader._StreamParser

A helper for parsing messages into rows.

message google.cloud.bigquery_storage_v1.types.ReadRowsResponse

A message of data from a read rows stream.

ReadRowsStream

ReadRowsStream(client, name, offset, read_rows_kwargs, retry_delay_callback=None)

A stream of results from a read rows request.

This stream is an iterable of ReadRowsResponse. Iterate over it to fetch all row messages.

If the fastavro library is installed, use the rows() method to parse all messages into a stream of row dictionaries.

If the pandas and fastavro libraries are installed, use the to_dataframe() method to parse all messages into a pandas.DataFrame.

This object should not be created directly, but is returned by other methods in this library.