apache / apache/arrow

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

Aperta
#12,653 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
17.1k
Fork
4.3k
Merge medio
3g 18h
PR unite (30g)
91

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la sezione della documentazione Python sui dataset dedicata alla scrittura di grandi quantità di dati e riproduci l'esempio scanner-to-write_dataset su Windows; confrontalo con l'esempio R open_dataset |> write_dataset. Verifica se una delle due conversioni documentate va in crash per un input più grande della memoria disponibile e considera l'issue completata quando l'operazione documentata termina senza esaurire la memoria oppure la limitazione è documentata chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, r
Ambito
data-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.