You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BigQueryConnectionManager.dataset method is firing a deprecation warning due to its call to bigquery.Client.dataset:
[...]
2021-12-30 18:02:49.877082 (ThreadPoolExecutor-1_9): 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.
[...]
Client.dataset
Deprecated since version 1.24.0: Construct a DatasetReference using its constructor or use a string where previously a reference object was used.
Suggested Work
Given this and other updates to the BigQuery API, I think it would be healthy to do two things:
Simplify BigQueryConnectionManager.dataset to directly create a bigquery.DatasetReference.
optionally, rename this method to dataset_ref to be clear about what's being returned
Simplify BigQueryConnectionManager.table_ref to directly create a bigquery.TableReference; make it a static method.
With these changes, we can quit passing a conn around just to deliver a reference, and we'll meet (my interpretation of) BQ API best practice by working with unconnected references where possible and deferring 'connected' operations to a client.
Describe alternatives you've considered
do nothing / kick the can down the road on this deprecation
fix only the call triggering the deprecation warning, leave the rest as-is
cry
Additional context
n/a
Who will this benefit?
This will benefit maintainers by simplifying the signatures of two core methods.
Are you interested in contributing this feature?
Put me in, coach!
The text was updated successfully, but these errors were encountered:
Describe the feature
The
BigQueryConnectionManager.dataset
method is firing a deprecation warning due to its call tobigquery.Client.dataset
:From the current API docs:
Suggested Work
Given this and other updates to the BigQuery API, I think it would be healthy to do two things:
BigQueryConnectionManager.dataset
to directly create abigquery.DatasetReference
.dataset_ref
to be clear about what's being returnedBigQueryConnectionManager.table_ref
to directly create abigquery.TableReference
; make it a static method.With these changes, we can quit passing a
conn
around just to deliver a reference, and we'll meet (my interpretation of) BQ API best practice by working with unconnected references where possible and deferring 'connected' operations to a client.Describe alternatives you've considered
Additional context
n/a
Who will this benefit?
This will benefit maintainers by simplifying the signatures of two core methods.
Are you interested in contributing this feature?
Put me in, coach!
The text was updated successfully, but these errors were encountered: