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

docs: improve documentation for write client #403

Merged
merged 5 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ def append_rows(
rpc), and the stream is explicitly committed via the
``BatchCommitWriteStreams`` rpc.

Note: For users coding against the gRPC api directly, it may be
necessary to supply the x-goog-request-params system parameter
with ``write_stream=<full_write_stream_name>``.

More information about system parameters:
https://cloud.google.com/apis/docs/system-parameters


.. code-block:: python

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,13 @@ def append_rows(
rpc), and the stream is explicitly committed via the
``BatchCommitWriteStreams`` rpc.

Note: For users coding against the gRPC api directly, it may be
necessary to supply the x-goog-request-params system parameter
with ``write_stream=<full_write_stream_name>``.

More information about system parameters:
https://cloud.google.com/apis/docs/system-parameters


.. code-block:: python

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ def append_rows(
rpc), and the stream is explicitly committed via the
``BatchCommitWriteStreams`` rpc.

Note: For users coding against the gRPC api directly, it may be
necessary to supply the x-goog-request-params system parameter
with ``write_stream=<full_write_stream_name>``.

More information about system parameters:
https://cloud.google.com/apis/docs/system-parameters

Returns:
Callable[[~.AppendRowsRequest],
~.AppendRowsResponse]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ def append_rows(
rpc), and the stream is explicitly committed via the
``BatchCommitWriteStreams`` rpc.

Note: For users coding against the gRPC api directly, it may be
necessary to supply the x-goog-request-params system parameter
with ``write_stream=<full_write_stream_name>``.

More information about system parameters:
https://cloud.google.com/apis/docs/system-parameters

Returns:
Callable[[~.AppendRowsRequest],
Awaitable[~.AppendRowsResponse]]:
Expand Down
8 changes: 6 additions & 2 deletions google/cloud/bigquery_storage_v1/types/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,12 @@ class AppendRowsRequest(proto.Message):
request.

For explicitly created write streams, the format is:
``projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}``

- ``projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}``

For the special default stream, the format is:
``projects/{project}/datasets/{dataset}/tables/{table}/_default``.

- ``projects/{project}/datasets/{dataset}/tables/{table}/streams/_default``.
offset (google.protobuf.wrappers_pb2.Int64Value):
If present, the write is only performed if the next append
offset is same as the provided value. If not present, the
Expand Down Expand Up @@ -529,6 +531,8 @@ class StorageErrorCode(proto.Enum):
INVALID_STREAM_STATE = 5
STREAM_FINALIZED = 6
SCHEMA_MISMATCH_EXTRA_FIELDS = 7
OFFSET_ALREADY_EXISTS = 8
OFFSET_OUT_OF_RANGE = 9

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