Skip to content

feat: BigQuery Storage v1beta1 API migration guide#14345

Open
benhxy wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
benhxy:v1beta1
Open

feat: BigQuery Storage v1beta1 API migration guide#14345
benhxy wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
benhxy:v1beta1

Conversation

@benhxy

@benhxy benhxy commented Jun 22, 2026

Copy link
Copy Markdown

Description

Fixes b/505001153. BigQuery Storage team is planning to deprecate v1beta1 API. This PR adds a migration guide from v1beta1 to v1.

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@benhxy benhxy requested review from a team as code owners June 22, 2026 17:27
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: bigquerystorage Issues related to the BigQuery Storage API. labels Jun 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a migration guide for transitioning Python code using the BigQuery Storage API from version v1beta1 to v1. The review feedback correctly identifies a critical issue in the guide's text and code examples: the parameter for specifying a stream in read_rows is incorrectly documented as name instead of read_stream, which would cause a runtime TypeError for users following the guide.

Comment on lines +21 to +23
* **Read Rows Request**: `StreamPosition` is flattened. You now pass the
stream name directly to `read_rows` as `name` (maps to `read_stream` in
proto) and the `offset`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

In the Python client library for v1, the parameter name for read_rows is read_stream, not name. Using name will result in a TypeError at runtime.

Please update this description to refer to read_stream instead of name.

Comment on lines +118 to +123
# read_rows accepts stream name and offset directly.
# Note that the parameter name in the library helper is 'name', which maps to 'read_stream' in proto.
reader = client.read_rows(
name=session.streams[0].name,
offset=0
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The keyword argument for specifying the stream in read_rows is read_stream, not name. Passing name will raise a TypeError: read_rows() got an unexpected keyword argument 'name'.

Suggested change
# read_rows accepts stream name and offset directly.
# Note that the parameter name in the library helper is 'name', which maps to 'read_stream' in proto.
reader = client.read_rows(
name=session.streams[0].name,
offset=0
)
# read_rows accepts stream name and offset directly.
reader = client.read_rows(
read_stream=session.streams[0].name,
offset=0
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquerystorage Issues related to the BigQuery Storage API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant