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
{{ message }}
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
writer.AppendRowsStream missing from v2 bigquery_storage #752
api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.needs more infoThis issue needs more information from the customer to proceed.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.
In the V1 client, writer was importable as shown below, which allowed for creation of a AppendRowsStream row stream objects. However, after migrating from V2 it seems writer is no longer available which is a breaking change that is not covered in the migration guide. Could you please let me know what class in V2 replaces AppendRowsStream from V1?
And here's the context in which it's used in my codebase:
defsetup_rows_stream(self):
# Create a template with fields needed for the first request.request_template=AppendRowsRequest()
# The initial request must contain the stream name.request_template.write_stream=self.write_stream.name# So that BigQuery knows how to parse the serialized_rows, generate a# protocol buffer representation of your message descriptor.proto_schema=ProtoSchema()
proto_descriptor=descriptor_pb2.DescriptorProto()
self.proto_obj.DESCRIPTOR.CopyToProto(proto_descriptor)
proto_schema.proto_descriptor=proto_descriptorproto_data=AppendRowsRequest.ProtoData()
proto_data.writer_schema=proto_schemarequest_template.proto_rows=proto_dataappend_rows_stream=writer.AppendRowsStream(
self.write_client, request_template
)
returnappend_rows_stream
Thank you @CharlesFr for raising the issue. Could you tell me more about what you mean by V2, and why you are not using google.cloud.bigquery_storage_v1 for imports? All the APIs you mentioned are available there.
api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.needs more infoThis issue needs more information from the customer to proceed.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.
Activity
xionams commentedon Mar 4, 2024
"Could you please let me know what class in V2 replaces AppendRowsStream from V1?"
As far as I understand, the new "way" to write is by using the AppendRows method instead of AppendRowsStream to write.
You can read about AppendRows here:
https://cloud.google.com/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1#google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows
Linchin commentedon Mar 13, 2024
Thank you @CharlesFr for raising the issue. Could you tell me more about what you mean by V2, and why you are not using
google.cloud.bigquery_storage_v1for imports? All the APIs you mentioned are available there.