跳到內容

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)