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: Unable to create temporary table on bigquery #8975

Closed
1 task done
albertjstanley opened this issue Apr 15, 2024 · 3 comments · Fixed by #8976
Closed
1 task done

bug: Unable to create temporary table on bigquery #8975

albertjstanley opened this issue Apr 15, 2024 · 3 comments · Fixed by #8976
Labels
bug Incorrect behavior inside of ibis

Comments

@albertjstanley
Copy link

What happened?

I was trying to make a temporary table on bigquery with this code:

import ibis
from google.oauth2 import service_account

credentials = service_account.Credentials.from_service_account_file(
    './service_account.json')
con = ibis.bigquery.connect(
    project_id = "ajskdfce-demo",
    dataset_id = "dataset",
    credentials = credentials
)

temp_df = con.table("some_table_id")
temp_table = con.create_table("temp_table_name", temp_df, temp=True)

This causes an error (logs below). It works fine if I set temp=False.

What version of ibis are you using?

8.0.0

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

BigQuery

Relevant log output

Traceback (most recent call last):
  File "/Users/albertstanley/Code/ibis/create_temp_table.py", line 14, in <module>
    temp_table = con.create_table("temp_table_name", temp_df, database="dataset", temp=True)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ibis/backends/bigquery/__init__.py", line 955, in create_table
    dataset = self._session_dataset.dataset_id
AttributeError: 'NoneType' object has no attribute 'dataset_id'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@albertjstanley albertjstanley added the bug Incorrect behavior inside of ibis label Apr 15, 2024
@cpcloud
Copy link
Member

cpcloud commented Apr 15, 2024

Can you try with a pre-release?

pip install 'ibis-framework[bigquery]' --pre --upgrade

I believe we've already fixed this.

@albertjstanley
Copy link
Author

Looks like I'm still getting the error with the pre-release ('9.0.0.dev619').

@cpcloud
Copy link
Member

cpcloud commented Apr 15, 2024

Yep, thanks for the report. I am able to reproduce this. PR incoming.

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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants