Skip to content

Commit

Permalink
refactor(bigquery): return data_project as database, not dataset_id
Browse files Browse the repository at this point in the history
BREAKING CHANGE: the bigquery `current_database` method returns the `data_project` instead of the `dataset_id`. Use `current_schema` to retrieve `dataset_id`.  To explicitly list tables in a given project and dataset, you can use `f"{con.current_database}.{con.current_schema}"`
  • Loading branch information
gforsyth committed Dec 19, 2023
1 parent f03ad0c commit 05608eb
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions ibis/backends/bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import glob
import os
import re
import warnings
from functools import partial
from typing import TYPE_CHECKING, Any, Callable, Optional
from urllib.parse import parse_qs, urlparse
Expand Down Expand Up @@ -654,13 +653,7 @@ def raw_sql(self, query: str, results=False, params=None):

@property
def current_database(self) -> str:
warnings.warn(
"current_database will return the current *data project* in ibis 7.0.0; "
"use current_schema for the current BigQuery dataset",
category=FutureWarning,
)
# TODO: return self.data_project in ibis 7.0.0
return self.dataset
return self.data_project

@property
def current_schema(self) -> str | None:
Expand Down

0 comments on commit 05608eb

Please sign in to comment.