apache/sedona

feat: add to_sedonadb() method

Open

#2.511 geöffnet am 19. Nov. 2025

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Scala (693 Forks)batch import
help wanted

Repository-Metriken

Stars
 (1.953 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 3h) (35 gemergte PRs in 30 T)

Beschreibung

It would be nice to have an interface that converts a SedonaSpark DataFrame to a SedonaDB DataFrame easily. Here is a current solution that works:

import sedona.db
sd = sedona.db.connect()

df = sd.create_data_frame(dataframe_to_arrow(spark_df))

This could be nice:

spark_df.to_sedonadb()

But maybe we'd have to do this:

spark_df.to_sedonadb(sd)

This would allow for cool spatial workflows, like this:

  • Read an Iceberg table with SedonaSpark and perform big data operations with a filtering operation at the end to make the data small enough to fit on a single machine
  • Convert the SedonaSpark DataFrame to SedonaDB
  • Use a library that's compatible with SedonaDB, like lonboard, to create a graph

Let me know what you think!

Contributor Guide