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

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

Super class

arrow::Object -> RecordBatchWriter

Methods

Public methods

Inherited methods

Method write_batch()

Usage

RecordBatchWriter$write_batch(batch)


Method write_table()

Usage

RecordBatchWriter$write_table(table)


Method write()

Usage

RecordBatchWriter$write(x)


Method close()

Usage

RecordBatchWriter$close()


Method clone()

The objects of this class are cloneable with this method.

Usage

RecordBatchWriter$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super classes

arrow::Object -> arrow::RecordBatchWriter -> RecordBatchStreamWriter

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage

RecordBatchStreamWriter$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super classes

arrow::Object -> arrow::RecordBatchWriter -> arrow::RecordBatchStreamWriter -> RecordBatchFileWriter

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage

RecordBatchFileWriter$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.