Skip to content

PySpark to IBIS #7443

Answered by gforsyth
vmsaipreeth asked this question in Q&A
Oct 26, 2023 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

hi @vmsaipreeth -- do you have an existing Spark session that this DataFrame is attached to?

Ibis connects to a Spark Session, so if the DataFrame is a view in that session, you can interact with it that way. It would probably look something like:

import ibis
from pyspark.sql import SparkSession

session = SparkSession.builder.appName("my_session").getOrCreate()

existing_spark_df.createOrReplaceTempView("my_df")

con = ibis.pyspark.connect(session)

my_df = con.table("my_df")

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@vmsaipreeth
Comment options

@lostmygithubaccount
Comment options

Comment options

You must be logged in to vote
2 replies
@vmsaipreeth
Comment options

@gforsyth
Comment options

Answer selected by lostmygithubaccount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants