apache / apache/arrow

Conversion from one dataset to another that will not fit in memory?

未关闭
#12,653 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
17.1k
派生
4.3k
平均合并
3 天 18 小时
30 天内合并 PR
91

描述

Having found the following description in the documentation, I tried the operation of scanning a dataset larger than memory and writing it to another dataset.

https://arrow.apache.org/docs/python/dataset.html#writing-large-amounts-of-data

> The above examples wrote data from a table. If you are writing a large amount of data you may not be able to load everything into a single in-memory table. Fortunately, the write_dataset() method also accepts an iterable of record batches. This makes it really simple, for example, to repartition a large dataset without loading the entire dataset into memory:

```python
import pyarrow.dataset as ds

input_dataset = ds.dataset("input")
ds.write_dataset(inpute_dataset.scanner(), "output", format="parquet")
```

```r
arrow::open_dataset("input") |>
arrow::write_dataset("output")
```

But both Python and R on Windows crashed due to lack of memory. Am I missing something?
Is there a recommended way to convert one dataset to another without running out of computer memory?

贡献指南

打开贡献指南

调研方向

从 Python 数据集文档中关于写入大量数据的部分开始,并在 Windows 上复现 scanner-to-write_dataset 示例;将其与 R 的 open_dataset |> write_dataset 示例进行比较。检查任一有文档记录的转换在输入大于内存时是否会崩溃,并在有文档记录的操作完成且未耗尽内存,或该限制已得到明确记录时,认为 issue 已完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python, r
领域
data-engineering
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。