apache / apache/arrow

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

Offen
#12,653 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
17.1k
Forks
4.3k
Ø Merge
3 T. 18 Std.
Gemergte PRs (30 T.)
91

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit dem Abschnitt der Python-Dataset-Dokumentation zum Schreiben großer Datenmengen und reproduzieren Sie das Beispiel scanner-to-write_dataset unter Windows; vergleichen Sie es mit dem Beispiel open_dataset |> write_dataset für R. Prüfen Sie, ob eine der beiden dokumentierten Konvertierungen bei einer Eingabe, die größer als der verfügbare Speicher ist, abstürzt, und betrachten Sie das Issue als erledigt, wenn der dokumentierte Vorgang abgeschlossen wird, ohne den Speicher zu erschöpfen, oder die Einschränkung klar dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, r
Bereich
data-engineering
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.