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

feat: update synth to generate v1beta2, v1 endpoints for bigquerystorage #10

Merged
merged 7 commits into from Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/gapic/v1/api.rst
@@ -0,0 +1,6 @@
Client for BigQuery Storage API
===============================

.. automodule:: google.cloud.bigquery_storage_v1
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/gapic/v1/types.rst
@@ -0,0 +1,5 @@
Types for BigQuery Storage API Client
=====================================

.. automodule:: google.cloud.bigquery_storage_v1.types
:members:
6 changes: 6 additions & 0 deletions docs/gapic/v1beta2/api.rst
@@ -0,0 +1,6 @@
Client for BigQuery Storage API
===============================

.. automodule:: google.cloud.bigquery_storage_v1beta2
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/gapic/v1beta2/types.rst
@@ -0,0 +1,5 @@
Types for BigQuery Storage API Client
=====================================

.. automodule:: google.cloud.bigquery_storage_v1beta2.types
:members:
6 changes: 6 additions & 0 deletions docs/index.rst
Expand Up @@ -9,6 +9,12 @@ API Reference
gapic/v1beta1/reader
gapic/v1beta1/types

gapic/v1beta2/api
gapic/v1beta2/types

gapic/v1/api
gapic/v1/types

Example Usage
-------------

Expand Down
8 changes: 4 additions & 4 deletions google/cloud/bigquery_storage.py
Expand Up @@ -17,9 +17,9 @@

from __future__ import absolute_import

from google.cloud.bigquery_storage_v1beta1 import BigQueryStorageClient
from google.cloud.bigquery_storage_v1beta1 import enums
from google.cloud.bigquery_storage_v1beta1 import types
from google.cloud.bigquery_storage_v1 import BigQueryReadClient
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tswast This is one change I'm worried about. Do we rely on this non-versioned client for anything elsewhere that would care about getting shifted from v1beta1 to v1? It's going to require further changes to address if so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our public samples, I always used the v1beta1 module. There are a few versions of pandas-gbq that use the versionless module, but I fixed that in the latest version. (googleapis/python-bigquery-pandas@e177978#diff-4db670026d33c02e5ad3dfbd5e4fd595R11)

So, yes: this will break a few versions of pandas-gbq. Might be worth making some aliases for BigQueryStorageClient and the necessary methods to avoid breakages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the proto messages have changed between v1beta1 and v1beta2 it seems you'd need more than just an alias to get the right client name. Things like tablereferences became a single string rather than a structured object, sharding strategy went away (everything is balanced), which makes converting a bit dicey if you were expecting the old strategy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. When customers hit this, we can tell them to either upgrade pandas-gbq or pin their google-cloud-bigquery-storage version.

from google.cloud.bigquery_storage_v1 import enums
from google.cloud.bigquery_storage_v1 import types


__all__ = ("enums", "types", "BigQueryStorageClient")
__all__ = ("enums", "types", "BigQueryReadClient")
Empty file.
Empty file.