pyarrow.flight.MetadataRecordBatchWriter#
- class pyarrow.flight.MetadataRecordBatchWriter#
Bases:
_CRecordBatchWriter
A RecordBatchWriter that also allows writing application metadata.
This class is a context manager; on exit, close() will be called.
- __init__(*args, **kwargs)#
Methods
__init__
(*args, **kwargs)begin
(self, Schema schema[, options])Prepare to write data to this stream with the given schema.
close
(self)Close stream and write end-of-stream 0 marker.
write
(self, table_or_batch)Write RecordBatch or Table to stream.
write_batch
(self, RecordBatch batch)Write RecordBatch to stream.
write_metadata
(self, buf)Write Flight metadata by itself.
write_table
(self, Table table[, max_chunksize])Write Table to stream in (contiguous) RecordBatch objects.
write_with_metadata
(self, RecordBatch batch, buf)Write a RecordBatch along with Flight metadata.
Attributes
Current IPC write statistics.
- begin(self, Schema schema: Schema, options=None)#
Prepare to write data to this stream with the given schema.
- close(self)#
Close stream and write end-of-stream 0 marker.
- stats#
Current IPC write statistics.
- write(self, table_or_batch)#
Write RecordBatch or Table to stream.
- Parameters:
- table_or_batch{
RecordBatch
,Table
}
- table_or_batch{
- write_batch(self, RecordBatch batch)#
Write RecordBatch to stream.
- Parameters:
- batch
RecordBatch
- batch
- write_metadata(self, buf)#
Write Flight metadata by itself.
- write_table(self, Table table, max_chunksize=None, **kwargs)#
Write Table to stream in (contiguous) RecordBatch objects.
- write_with_metadata(self, RecordBatch batch, buf)#
Write a RecordBatch along with Flight metadata.
- Parameters:
- batch
RecordBatch
The next RecordBatch in the stream.
- buf
Buffer
Application-specific metadata for the batch as defined by Flight.
- batch