arrow (version 0.16.0.2)

RecordBatchWriter: RecordBatchWriter classes

Description

RecordBatchFileWriter and RecordBatchStreamWriter are interfaces for writing record batches to either the binary file or streaming format.

Arguments

Usage

writer <- RecordBatchStreamWriter$create(sink, schema)

writer$write_batch(batch) writer$write_table(table) writer$close()

Factory

The RecordBatchFileWriter$create() and RecordBatchStreamWriter$create() factory methods instantiate the object and take a single argument, named according to the class:

  • sink A character file name or an OutputStream.

  • schema A Schema for the data to be written.

Methods

  • $write(x): Write a RecordBatch, Table, or data.frame, dispatching to the methods below appropriately

  • $write_batch(batch): Write a RecordBatch to stream

  • $write_table(table): Write a Table to stream

  • $close(): close stream