pyarrow.flight.FlightStreamWriter#
- class pyarrow.flight.FlightStreamWriter#
Bases:
pyarrow._flight.MetadataRecordBatchWriter
A writer that also allows closing the write side of a stream.
- __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.
done_writing
(self)Indicate that the client is done writing, but not done reading.
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.
- done_writing(self)#
Indicate that the client is done writing, but not done reading.
- 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