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

stats

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}
write_batch(self, RecordBatch batch)

Write RecordBatch to stream.

Parameters:
batchRecordBatch
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.

Parameters:
tableTable
max_chunksizeint, default None

Maximum size for RecordBatch chunks. Individual chunks may be smaller depending on the chunk layout of individual columns.

write_with_metadata(self, RecordBatch batch, buf)

Write a RecordBatch along with Flight metadata.

Parameters:
batchRecordBatch

The next RecordBatch in the stream.

bufBuffer

Application-specific metadata for the batch as defined by Flight.