Skip to content

Commit 770da17

Browse files
docs: improve documentation for write client (#403)
- [ ] Regenerate this pull request now. feat: update default timeout/retry information feat: update parent annotation for BatchCommitWriteStreamsRequest feat: expose additional StorageError enum values PiperOrigin-RevId: 431973595 Source-Link: googleapis/googleapis@25d691b Source-Link: googleapis/googleapis-gen@0ca2187 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGNhMjE4NzlhZTMxMzZhMmQ3MWZhODI0YjQ5ZGZhZjhhMGFlMGYyZSJ9
1 parent 15c34cf commit 770da17

5 files changed

Lines changed: 34 additions & 2 deletions

File tree

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/async_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,13 @@ def append_rows(
381381
rpc), and the stream is explicitly committed via the
382382
``BatchCommitWriteStreams`` rpc.
383383
384+
Note: For users coding against the gRPC api directly, it may be
385+
necessary to supply the x-goog-request-params system parameter
386+
with ``write_stream=<full_write_stream_name>``.
387+
388+
More information about system parameters:
389+
https://cloud.google.com/apis/docs/system-parameters
390+
384391
385392
.. code-block:: python
386393

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,13 @@ def append_rows(
570570
rpc), and the stream is explicitly committed via the
571571
``BatchCommitWriteStreams`` rpc.
572572
573+
Note: For users coding against the gRPC api directly, it may be
574+
necessary to supply the x-goog-request-params system parameter
575+
with ``write_stream=<full_write_stream_name>``.
576+
577+
More information about system parameters:
578+
https://cloud.google.com/apis/docs/system-parameters
579+
573580
574581
.. code-block:: python
575582

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ def append_rows(
305305
rpc), and the stream is explicitly committed via the
306306
``BatchCommitWriteStreams`` rpc.
307307
308+
Note: For users coding against the gRPC api directly, it may be
309+
necessary to supply the x-goog-request-params system parameter
310+
with ``write_stream=<full_write_stream_name>``.
311+
312+
More information about system parameters:
313+
https://cloud.google.com/apis/docs/system-parameters
314+
308315
Returns:
309316
Callable[[~.AppendRowsRequest],
310317
~.AppendRowsResponse]:

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ def append_rows(
307307
rpc), and the stream is explicitly committed via the
308308
``BatchCommitWriteStreams`` rpc.
309309
310+
Note: For users coding against the gRPC api directly, it may be
311+
necessary to supply the x-goog-request-params system parameter
312+
with ``write_stream=<full_write_stream_name>``.
313+
314+
More information about system parameters:
315+
https://cloud.google.com/apis/docs/system-parameters
316+
310317
Returns:
311318
Callable[[~.AppendRowsRequest],
312319
Awaitable[~.AppendRowsResponse]]:

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/types/storage.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,12 @@ class AppendRowsRequest(proto.Message):
280280
request.
281281
282282
For explicitly created write streams, the format is:
283-
``projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}``
283+
284+
- ``projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}``
284285
285286
For the special default stream, the format is:
286-
``projects/{project}/datasets/{dataset}/tables/{table}/_default``.
287+
288+
- ``projects/{project}/datasets/{dataset}/tables/{table}/streams/_default``.
287289
offset (google.protobuf.wrappers_pb2.Int64Value):
288290
If present, the write is only performed if the next append
289291
offset is same as the provided value. If not present, the
@@ -529,6 +531,8 @@ class StorageErrorCode(proto.Enum):
529531
INVALID_STREAM_STATE = 5
530532
STREAM_FINALIZED = 6
531533
SCHEMA_MISMATCH_EXTRA_FIELDS = 7
534+
OFFSET_ALREADY_EXISTS = 8
535+
OFFSET_OUT_OF_RANGE = 9
532536

533537
code = proto.Field(proto.ENUM, number=1, enum=StorageErrorCode,)
534538
entity = proto.Field(proto.STRING, number=2,)

0 commit comments

Comments
 (0)