Skip to content

feat: add to_sedonadb() method #2511

Closed

Description

@MrPowers

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!

Activity

  1. Subham-KRLX commented on Nov 21, 2025

    @Subham-KRLX
    Contributor

    I would like to work on this issue.

  2. added theissue type on Feb 10, 2026
  3. minhpham1810 commented on Oct 14, 2026

    @minhpham1810
    Contributor

    Since #2515 hasn't had any activity since March, I'd like to pick this up if that's okay. @Subham-KRLX, please let me know if you're still working on it and I'll step back.

    My plan is a small follow-up along the same lines:

    • add dataframe_to_sedonadb(df, connection=None) next to dataframe_to_arrow in sedona/spark/geoarrow, and expose it as DataFrame.to_sedonadb
    • test it with a real SedonaDB round trip (skipped when sedonadb isn't installed) instead of mocks
    • document it alongside the existing dataframe_to_arrow docs
  4. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions