Skip to content

Commit 074af14

Browse files
committed
Document client.dataset() deprecation.
Now that all client methods that take a `DatasetReference` or `TableReference` also take a string, the `client.dataset()` method is unnecessary and confusing.
1 parent 546ae39 commit 074af14

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

bigquery/google/cloud/bigquery/client.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,18 @@ def list_datasets(
288288
)
289289

290290
def dataset(self, dataset_id, project=None):
291-
"""Construct a reference to a dataset.
291+
"""Deprecated: Construct a reference to a dataset.
292+
293+
This method is deprecated. Construct a
294+
:class:`~google.cloud.bigquery.dataset.DatasetReference` using its
295+
constructor or use a string where previously a reference object was
296+
used.
297+
298+
As ``google-cloud-bigquery`` version 1.7.0, all client methods that
299+
take a :class:`~google.cloud.bigquery.dataset.DatasetReference` or
300+
:class:`~google.cloud.bigquery.table.TableReference` also take a
301+
string in standard SQL format, e.g. ``project.dataset_id`` or
302+
``project.dataset_id.table_id``.
292303
293304
:type dataset_id: str
294305
:param dataset_id: ID of the dataset.

0 commit comments

Comments
 (0)