@@ -17,6 +17,8 @@ syntax = "proto3";
1717
1818package google.cloud.bigquery.storage.v1beta1 ;
1919
20+ import "google/api/annotations.proto" ;
21+ import "google/api/resource.proto" ;
2022import "google/cloud/bigquery/storage/v1beta1/avro.proto" ;
2123import "google/cloud/bigquery/storage/v1beta1/read_options.proto" ;
2224import "google/cloud/bigquery/storage/v1beta1/table_reference.proto" ;
@@ -26,6 +28,7 @@ import "google/protobuf/timestamp.proto";
2628option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage" ;
2729option java_package = "com.google.cloud.bigquery.storage.v1beta1" ;
2830
31+
2932// BigQuery storage API.
3033//
3134// The BigQuery storage API can be used to read data stored in BigQuery.
@@ -42,7 +45,16 @@ service BigQueryStorage {
4245 //
4346 // Read sessions automatically expire 24 hours after they are created and do
4447 // not require manual clean-up by the caller.
45- rpc CreateReadSession (CreateReadSessionRequest ) returns (ReadSession ) {}
48+ rpc CreateReadSession (CreateReadSessionRequest ) returns (ReadSession ) {
49+ option (google.api.http ) = {
50+ post : "/v1beta1/{table_reference.project_id=projects/*}"
51+ body : "*"
52+ additional_bindings {
53+ post : "/v1beta1/{table_reference.dataset_id=projects/*/datasets/*}"
54+ body : "*"
55+ }
56+ };
57+ }
4658
4759 // Reads rows from the table in the format prescribed by the read session.
4860 // Each response contains one or more table rows, up to a maximum of 10 MiB
@@ -53,13 +65,21 @@ service BigQueryStorage {
5365 // estimated total number of rows in the read stream. This number is computed
5466 // based on the total table size and the number of active streams in the read
5567 // session, and may change as other streams continue to read data.
56- rpc ReadRows (ReadRowsRequest ) returns (stream ReadRowsResponse ) {}
68+ rpc ReadRows (ReadRowsRequest ) returns (stream ReadRowsResponse ) {
69+ option (google.api.http ) = {
70+ get : "/v1beta1/{read_position.stream.name=projects/*/streams/*}"
71+ };
72+ }
5773
5874 // Creates additional streams for a ReadSession. This API can be used to
5975 // dynamically adjust the parallelism of a batch processing task upwards by
6076 // adding additional workers.
61- rpc BatchCreateReadSessionStreams (BatchCreateReadSessionStreamsRequest )
62- returns (BatchCreateReadSessionStreamsResponse ) {}
77+ rpc BatchCreateReadSessionStreams (BatchCreateReadSessionStreamsRequest ) returns (BatchCreateReadSessionStreamsResponse ) {
78+ option (google.api.http ) = {
79+ post : "/v1beta1/{session.name=projects/*/sessions/*}"
80+ body : "*"
81+ };
82+ }
6383
6484 // Triggers the graceful termination of a single stream in a ReadSession. This
6585 // API can be used to dynamically adjust the parallelism of a batch processing
@@ -75,7 +95,12 @@ service BigQueryStorage {
7595 // This method will return an error if there are no other live streams
7696 // in the Session, or if SplitReadStream() has been called on the given
7797 // Stream.
78- rpc FinalizeStream (FinalizeStreamRequest ) returns (google.protobuf.Empty ) {}
98+ rpc FinalizeStream (FinalizeStreamRequest ) returns (google.protobuf.Empty ) {
99+ option (google.api.http ) = {
100+ post : "/v1beta1/{stream.name=projects/*/streams/*}"
101+ body : "*"
102+ };
103+ }
79104
80105 // Splits a given read stream into two Streams. These streams are referred to
81106 // as the primary and the residual of the split. The original stream can still
@@ -90,8 +115,11 @@ service BigQueryStorage {
90115 // completion.
91116 //
92117 // This method is guaranteed to be idempotent.
93- rpc SplitReadStream (SplitReadStreamRequest )
94- returns (SplitReadStreamResponse ) {}
118+ rpc SplitReadStream (SplitReadStreamRequest ) returns (SplitReadStreamResponse ) {
119+ option (google.api.http ) = {
120+ get : "/v1beta1/{original_stream.name=projects/*/streams/*}"
121+ };
122+ }
95123}
96124
97125// Information about a single data stream within a read session.
0 commit comments