Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Schema not found the second time a spark table is accessed #10749

Open
1 task done
christophediprima opened this issue Jan 29, 2025 · 0 comments
Open
1 task done
Labels
bug Incorrect behavior inside of ibis

Comments

@christophediprima
Copy link

What happened?

I am trying to insert into two different iceberg tables using spark connect. But as soon as I access a table using get_schema,table or insert I won't be able to do it a second time.

My code looks like this:

import ibis
from   pyspark.sql import SparkSession

session = SparkSession.builder.getOrCreate()
con = ibis.pyspark.connect(session)

new_dataframe = Dataframe creation here

con.insert(
  "my_table",
  new_dataframe,
  database="my_catalog.my_database",
)

new_dataframe_2 = Dataframe creation here

con.insert(
  "my_other_table",
  new_dataframe_2,
  database="my_catalog.my_database",
)

First insert will work but not the second one. If first insert is commented, second one will work. Same thing will happen regardless of the get_schema,table or insert method.

What version of ibis are you using?

ibis-framework[pyspark]==10.0.0.dev490

What backend(s) are you using, if any?

PySpark

Relevant log output

pyspark.errors.exceptions.connect.AnalysisException: [SCHEMA_NOT_FOUND] The schema `my_catalog`. cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a catalog, verify the current_schema() output, or qualify the name with the correct catalog.
To tolerate the error on drop use DROP SCHEMA IF EXISTS.

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis
Projects
Status: backlog
Development

No branches or pull requests

1 participant