跳到內容

將物件轉換為 Arrow RecordBatchReader

用法

as_record_batch_reader(x, ...)

# S3 method for class 'RecordBatchReader'
as_record_batch_reader(x, ...)

# S3 method for class 'Table'
as_record_batch_reader(x, ...)

# S3 method for class 'RecordBatch'
as_record_batch_reader(x, ...)

# S3 method for class 'data.frame'
as_record_batch_reader(x, ...)

# S3 method for class 'Dataset'
as_record_batch_reader(x, ...)

# S3 method for class '`function`'
as_record_batch_reader(x, ..., schema)

# S3 method for class 'arrow_dplyr_query'
as_record_batch_reader(x, ...)

# S3 method for class 'Scanner'
as_record_batch_reader(x, ...)

參數

x

要轉換為 RecordBatchReader 的物件

...

傳遞給 S3 方法

schema

必須符合當 x 為函數時,每次呼叫 x 所傳回 schema 的 schema()

一個 RecordBatchReader

範例

reader <- as_record_batch_reader(data.frame(col1 = 1, col2 = "two"))
reader$read_next_batch()
#> RecordBatch
#> 1 rows x 2 columns
#> $col1 <double>
#> $col2 <string>
#> 
#> See $metadata for additional Schema metadata