apache / apache/arrow

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

Abierto
#12,653 6 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
17.1k
Forks
4.3k
Merge medio
3 d 18 h
PR fusionados (30 d)
91

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la sección de la documentación de Python sobre datasets dedicada a escribir grandes cantidades de datos y reproduce el ejemplo scanner-to-write_dataset en Windows; compáralo con el ejemplo de R open_dataset |> write_dataset. Comprueba si alguna de las dos conversiones documentadas falla para una entrada mayor que la memoria disponible, y considera el issue resuelto cuando la operación documentada se complete sin agotar la memoria o la limitación esté claramente documentada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python, r
Área
data-engineering
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.