Skip to content

Commit 1c153ad

Browse files
Google APIscopybara-github
authored andcommitted
feat: increased the number of partitions can be written in a single request
docs: updated the number of partitions (from 100 to 900) can be inserted, updated and deleted in a single request BREAKING CHANGE: remove `location` from http annotations in all of the service requests PiperOrigin-RevId: 747473743
1 parent 340579b commit 1c153ad

2 files changed

Lines changed: 38 additions & 16 deletions

File tree

google/cloud/bigquery/storage/v1alpha/BUILD.bazel

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ java_gapic_library(
8080
test_deps = [
8181
":storage_java_grpc",
8282
],
83-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
8483
transport = "grpc",
8584
deps = [
8685
":storage_java_proto",
@@ -100,7 +99,6 @@ java_gapic_test(
10099
java_gapic_assembly_gradle_pkg(
101100
name = "google-cloud-bigquery-storage-v1alpha-java",
102101
include_samples = True,
103-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
104102
transport = "grpc",
105103
deps = [
106104
":storage_java_gapic",
@@ -140,7 +138,6 @@ go_gapic_library(
140138
release_level = "beta",
141139
rest_numeric_enums = True,
142140
service_yaml = "bigquerystorage_v1alpha.yaml",
143-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
144141
transport = "grpc",
145142
deps = [
146143
":storage_go_proto",
@@ -175,12 +172,11 @@ py_gapic_library(
175172
srcs = [":storage_proto"],
176173
grpc_service_config = "bigquerystorage_v1alpha_grpc_service_config.json",
177174
opt_args = [
178-
"python-gapic-namespace=google.cloud",
179175
"python-gapic-name=bigquery_storage",
176+
"python-gapic-namespace=google.cloud",
180177
],
181178
rest_numeric_enums = True,
182179
service_yaml = "bigquerystorage_v1alpha.yaml",
183-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
184180
transport = "grpc",
185181
deps = [
186182
],
@@ -227,7 +223,6 @@ php_gapic_library(
227223
migration_mode = "NEW_SURFACE_ONLY",
228224
rest_numeric_enums = True,
229225
service_yaml = "bigquerystorage_v1alpha.yaml",
230-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
231226
transport = "grpc",
232227
deps = [
233228
":storage_php_proto",
@@ -262,7 +257,6 @@ nodejs_gapic_library(
262257
package = "google.cloud.bigquery.storage.v1alpha",
263258
rest_numeric_enums = True,
264259
service_yaml = "bigquerystorage_v1alpha.yaml",
265-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
266260
transport = "grpc",
267261
deps = [],
268262
)
@@ -305,7 +299,6 @@ ruby_cloud_gapic_library(
305299
grpc_service_config = "bigquerystorage_v1alpha_grpc_service_config.json",
306300
rest_numeric_enums = True,
307301
service_yaml = "bigquerystorage_v1alpha.yaml",
308-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
309302
transport = "grpc",
310303
deps = [
311304
":storage_ruby_grpc",
@@ -337,6 +330,7 @@ load(
337330

338331
csharp_proto_library(
339332
name = "storage_csharp_proto",
333+
extra_opts = [],
340334
deps = [":storage_proto"],
341335
)
342336

@@ -353,7 +347,6 @@ csharp_gapic_library(
353347
grpc_service_config = "bigquerystorage_v1alpha_grpc_service_config.json",
354348
rest_numeric_enums = True,
355349
service_yaml = "bigquerystorage_v1alpha.yaml",
356-
# TODO(b/361784870): Do not enable `rest` until this bug is fixed.
357350
transport = "grpc",
358351
deps = [
359352
":storage_csharp_grpc",

google/cloud/bigquery/storage/v1alpha/metastore_partition.proto

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ option (google.api.resource_definition) = {
3636
};
3737

3838
// BigQuery Metastore Partition Service API.
39-
// This service is used for managing metastore partitions in BigQuery metastore.
40-
// The service supports only batch operations for write.
39+
// This service is used for managing metastore partitions in BigQuery
40+
// metastore. The service supports only batch operations for write.
4141
service MetastorePartitionService {
4242
option (google.api.default_host) = "bigquerystorage.googleapis.com";
4343
option (google.api.oauth_scopes) =
@@ -48,7 +48,7 @@ service MetastorePartitionService {
4848
rpc BatchCreateMetastorePartitions(BatchCreateMetastorePartitionsRequest)
4949
returns (BatchCreateMetastorePartitionsResponse) {
5050
option (google.api.http) = {
51-
post: "/v1alpha/{parent=projects/*/locations/*/datasets/*/tables/*}/partitions:batchCreate"
51+
post: "/v1alpha/{parent=projects/*/datasets/*/tables/*}/partitions:batchCreate"
5252
body: "*"
5353
};
5454
}
@@ -57,7 +57,7 @@ service MetastorePartitionService {
5757
rpc BatchDeleteMetastorePartitions(BatchDeleteMetastorePartitionsRequest)
5858
returns (google.protobuf.Empty) {
5959
option (google.api.http) = {
60-
post: "/v1alpha/{parent=projects/*/locations/*/datasets/*/tables/*}/partitions:batchDelete"
60+
post: "/v1alpha/{parent=projects/*/datasets/*/tables/*}/partitions:batchDelete"
6161
body: "*"
6262
};
6363
}
@@ -66,7 +66,7 @@ service MetastorePartitionService {
6666
rpc BatchUpdateMetastorePartitions(BatchUpdateMetastorePartitionsRequest)
6767
returns (BatchUpdateMetastorePartitionsResponse) {
6868
option (google.api.http) = {
69-
post: "/v1alpha/{parent=projects/*/locations/*/datasets/*/tables/*}/partitions:batchUpdate"
69+
post: "/v1alpha/{parent=projects/*/datasets/*/tables/*}/partitions:batchUpdate"
7070
body: "*"
7171
};
7272
}
@@ -125,8 +125,15 @@ message BatchCreateMetastorePartitionsRequest {
125125
// add_partitions(..). If the flag is set to false, the server will return
126126
// ALREADY_EXISTS if any partition already exists. If the flag is set to true,
127127
// the server will skip existing partitions and insert only the non-existing
128-
// partitions.
128+
// partitions. A maximum of 900 partitions can be inserted in a batch.
129129
bool skip_existing_partitions = 3 [(google.api.field_behavior) = OPTIONAL];
130+
131+
// Optional. Optional trace id to be used for debugging. It is expected that
132+
// the client sets the same `trace_id` for all the batches in the same
133+
// operation, so that it is possible to tie together the logs to all the
134+
// batches in the same operation. Limited to 256 characters. This is expected,
135+
// but not required, to be globally unique.
136+
string trace_id = 4 [(google.api.field_behavior) = OPTIONAL];
130137
}
131138

132139
// Response message for BatchCreateMetastorePartitions.
@@ -148,9 +155,16 @@ message BatchDeleteMetastorePartitionsRequest {
148155
];
149156

150157
// Required. The list of metastore partitions (identified by its values) to be
151-
// deleted. A maximum of 100 partitions can be deleted in a batch.
158+
// deleted. A maximum of 900 partitions can be deleted in a batch.
152159
repeated MetastorePartitionValues partition_values = 2
153160
[(google.api.field_behavior) = REQUIRED];
161+
162+
// Optional. Optional trace id to be used for debugging. It is expected that
163+
// the client sets the same `trace_id` for all the batches in the same
164+
// operation, so that it is possible to tie together the logs to all the
165+
// batches in the same operation. This is expected, but not required, to be
166+
// globally unique.
167+
string trace_id = 4 [(google.api.field_behavior) = OPTIONAL];
154168
}
155169

156170
// Request message for UpdateMetastorePartition.
@@ -177,11 +191,19 @@ message BatchUpdateMetastorePartitionsRequest {
177191
// Required. Requests to update metastore partitions in the table.
178192
repeated UpdateMetastorePartitionRequest requests = 2
179193
[(google.api.field_behavior) = REQUIRED];
194+
195+
// Optional. Optional trace id to be used for debugging. It is expected that
196+
// the client sets the same `trace_id` for all the batches in the same
197+
// operation, so that it is possible to tie together the logs to all the
198+
// batches in the same operation. This is expected, but not required, to be
199+
// globally unique.
200+
string trace_id = 4 [(google.api.field_behavior) = OPTIONAL];
180201
}
181202

182203
// Response message for BatchUpdateMetastorePartitions.
183204
message BatchUpdateMetastorePartitionsResponse {
184205
// The list of metastore partitions that have been updated.
206+
// A maximum of 900 partitions can be updated in a batch.
185207
repeated MetastorePartition partitions = 1;
186208
}
187209

@@ -206,6 +228,13 @@ message ListMetastorePartitionsRequest {
206228
// "numeric_field BETWEEN 1.0 AND 5.0"
207229
// Restricted to a maximum length for 1 MB.
208230
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
231+
232+
// Optional. Optional trace id to be used for debugging. It is expected that
233+
// the client sets the same `trace_id` for all the batches in the same
234+
// operation, so that it is possible to tie together the logs to all the
235+
// batches in the same operation. Limited to 256 characters. This is expected,
236+
// but not required, to be globally unique.
237+
string trace_id = 3 [(google.api.field_behavior) = OPTIONAL];
209238
}
210239

211240
// Response message for ListMetastorePartitions.

0 commit comments

Comments
 (0)