GeezerVison is showing github.com — docs: improve documentation for write client (#403) · googleapis/google-cloud-python@770da17
File treeExpand file treeCollapse file tree Open diff view settings packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/async_client.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -381,6 +381,13 @@ def append_rows( | 381 | 381 | rpc), and the stream is explicitly committed via the | 382 | 382 | ``BatchCommitWriteStreams`` rpc. | 383 | 383 |
| | 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 | +
| 384 | 391 |
| 385 | 392 | .. code-block:: python | 386 | 393 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/client.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -570,6 +570,13 @@ def append_rows( | 570 | 570 | rpc), and the stream is explicitly committed via the | 571 | 571 | ``BatchCommitWriteStreams`` rpc. | 572 | 572 |
| | 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 | +
| 573 | 580 |
| 574 | 581 | .. code-block:: python | 575 | 582 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -305,6 +305,13 @@ def append_rows( | 305 | 305 | rpc), and the stream is explicitly committed via the | 306 | 306 | ``BatchCommitWriteStreams`` rpc. | 307 | 307 |
| | 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 | +
| 308 | 315 | Returns: | 309 | 316 | Callable[[~.AppendRowsRequest], | 310 | 317 | ~.AppendRowsResponse]: | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -307,6 +307,13 @@ def append_rows( | 307 | 307 | rpc), and the stream is explicitly committed via the | 308 | 308 | ``BatchCommitWriteStreams`` rpc. | 309 | 309 |
| | 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 | +
| 310 | 317 | Returns: | 311 | 318 | Callable[[~.AppendRowsRequest], | 312 | 319 | Awaitable[~.AppendRowsResponse]]: | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/types/storage.py +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -280,10 +280,12 @@ class AppendRowsRequest(proto.Message): | 280 | 280 | request. | 281 | 281 |
| 282 | 282 | 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}`` | 284 | 285 |
| 285 | 286 | 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``. | 287 | 289 | offset (google.protobuf.wrappers_pb2.Int64Value): | 288 | 290 | If present, the write is only performed if the next append | 289 | 291 | offset is same as the provided value. If not present, the | @@ -529,6 +531,8 @@ class StorageErrorCode(proto.Enum): | 529 | 531 | INVALID_STREAM_STATE = 5 | 530 | 532 | STREAM_FINALIZED = 6 | 531 | 533 | SCHEMA_MISMATCH_EXTRA_FIELDS = 7 | | 534 | + OFFSET_ALREADY_EXISTS = 8 | | 535 | + OFFSET_OUT_OF_RANGE = 9 | 532 | 536 |
| 533 | 537 | code = proto.Field(proto.ENUM, number=1, enum=StorageErrorCode,) | 534 | 538 | entity = proto.Field(proto.STRING, number=2,) | |
|