跳转至内容

Apache Arrow 定义了两种用于序列化数据以进行进程间通信 (IPC) 的格式:一种是“流”格式,另一种是“文件”格式,称为 Feather。write_ipc_stream()write_feather() 分别写入这些格式。

用法

write_ipc_stream(x, sink, ...)

参数

x

data.frameRecordBatchTable

sink

字符串文件路径、连接、URI 或 OutputStream,或文件系统 (SubTreeFileSystem) 中的路径

...

传递给 write_feather() 的额外参数。

返回值

隐式返回 x

另请参阅

write_feather() 用于写入 IPC 文件。write_to_raw() 用于将数据序列化为缓冲区。RecordBatchWriter 用于更底层的接口。

示例

tf <- tempfile()
on.exit(unlink(tf))
write_ipc_stream(mtcars, tf)