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

CLN: avoid use of client.dataset, prefer DatasetReference constructor, instead #312

Closed
tswast opened this issue Feb 12, 2020 · 1 comment · Fixed by #355
Closed

CLN: avoid use of client.dataset, prefer DatasetReference constructor, instead #312

tswast opened this issue Feb 12, 2020 · 1 comment · Fixed by #355
Assignees

Comments

@tswast
Copy link
Collaborator

tswast commented Feb 12, 2020

Getting deprecation warnings in integration tests:

samples/tests/test_to_gbq.py::test_to_gbq_simple
  /root/project/pandas_gbq/load.py:59: PendingDeprecationWarning: Client.dataset is deprecated and will be removed in a future version. Use a string like 'my_project.my_dataset' or a cloud.google.bigquery.DatasetReference object, instead.
    destination_table = client.dataset(dataset_id).table(table_id)
@nathan-ok
Copy link

A comment i found within the client.py class in the dataset function relating to this issue,
As of google-cloud-bigquery version 1.7.0, all client methods
that take a
:class:~google.cloud.bigquery.dataset.DatasetReference or
:class:~google.cloud.bigquery.table.TableReference also take a
string in standard SQL format, e.g. project.dataset_id or
project.dataset_id.table_id.
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablereference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants