Skip to content

RecordBatchReader

arro3.core.RecordBatchReader

An Arrow RecordBatchReader.

A RecordBatchReader holds a stream of RecordBatch.

closed property

closed: bool

Returns true if this reader has already been consumed.

schema property

schema: Schema

Access the schema of this table.

__arrow_c_schema__

__arrow_c_schema__() -> object

An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.

This allows Arrow consumers to inspect the data type of this RecordBatchReader. Then the consumer can ask the producer (in __arrow_c_stream__) to cast the exported data to a supported data type.

__arrow_c_stream__

__arrow_c_stream__(requested_schema: object | None = None) -> object

An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.

For example, you can call pyarrow.RecordBatchReader.from_stream to convert this stream to a pyarrow RecordBatchReader. Alternatively, you can call pyarrow.table() to consume this stream to a pyarrow table or Table.from_arrow() to consume this stream to an arro3 Table.

from_arrow classmethod

Construct this from an existing Arrow object.

It can be called on anything that exports the Arrow stream interface (has an __arrow_c_stream__ method), such as a Table or RecordBatchReader.

from_arrow_pycapsule classmethod

from_arrow_pycapsule(capsule) -> RecordBatchReader

Construct this object from a bare Arrow PyCapsule