feat: add RenameTable, etag, and ListTables view to BigQuery BigLake v1alpha1 API

PiperOrigin-RevId: 522120936
pull/792/head
Google APIs 2 years ago committed by Copybara-Service
parent 3aef0dd502
commit 54b4623134
  1. 15
      google/cloud/bigquery/biglake/v1alpha1/biglake_v1alpha1.yaml
  2. 55
      google/cloud/bigquery/biglake/v1alpha1/metastore.proto

@ -26,20 +26,17 @@ authentication:
https://www.googleapis.com/auth/cloud-platform
publishing:
organization: CLOUD
new_issue_uri: 'https://issuetracker.google.com/issues/new?component=187149&template=1019829'
documentation_uri: 'https://cloud.google.com/bigquery/docs/iceberg-tables#create-using-biglake-metastore'
api_short_name: 'biglake'
new_issue_uri: https://issuetracker.google.com/issues/new?component=187149&template=1019829
documentation_uri: https://cloud.google.com/bigquery/docs/iceberg-tables#create-using-biglake-metastore
api_short_name: biglake
github_label: 'api: biglake'
doc_tag_prefix: 'biglake'
codeowner_github_teams:
doc_tag_prefix: biglake
organization: CLOUD
library_settings:
- version: 'google.cloud.bigquery.biglake.v1alpha1'
- version: google.cloud.bigquery.biglake.v1alpha1
launch_stage: ALPHA
rest_numeric_enums: true
java_settings:
library_package: ''
service_class_names:
common:
destinations:
- PACKAGE_MANAGER

@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -146,6 +146,15 @@ service MetastoreService {
option (google.api.method_signature) = "table,update_mask";
}
// Renames an existing table specified by the table ID.
rpc RenameTable(RenameTableRequest) returns (Table) {
option (google.api.http) = {
post: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/tables/*}:rename"
body: "*"
};
option (google.api.method_signature) = "name,new_name";
}
// Gets the table specified by the resource name.
rpc GetTable(GetTableRequest) returns (Table) {
option (google.api.http) = {
@ -197,6 +206,20 @@ service MetastoreService {
}
}
// View on Table. Represents which fields will be populated for calls that
// return Table objects.
enum TableView {
// Default value. The API will default to the BASIC view.
TABLE_VIEW_UNSPECIFIED = 0;
// Include only table names.
// This is the default value.
BASIC = 1;
// Include everything.
FULL = 2;
}
// Catalog is the container of databases.
message Catalog {
option (google.api.resource) = {
@ -336,6 +359,12 @@ message Table {
// The table type.
Type type = 6;
// The checksum of a table object computed by the server based on the value of
// other fields. It may be sent on update requests to ensure the client has an
// up-to-date value before proceeding. It is only checked for update table
// operations.
string etag = 8;
}
// Represents a lock.
@ -602,7 +631,7 @@ message DeleteTableRequest {
message UpdateTableRequest {
// Required. The table to update.
//
// The table's `name` field is used to identify the database to update.
// The table's `name` field is used to identify the table to update.
// Format:
// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
Table table = 1 [(google.api.field_behavior) = REQUIRED];
@ -615,6 +644,25 @@ message UpdateTableRequest {
google.protobuf.FieldMask update_mask = 2;
}
// Request message for the RenameTable method in MetastoreService
message RenameTableRequest {
// Required. The table's `name` field is used to identify the table to rename.
// Format:
// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
];
// Required. The new `name` for the specified table, must be in the same
// database. Format:
// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
string new_name = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
];
}
// Request message for the GetTable method.
message GetTableRequest {
// Required. The name of the table to retrieve.
@ -650,6 +698,9 @@ message ListTablesRequest {
// When paginating, all other parameters provided to `ListTables` must match
// the call that provided the page token.
string page_token = 3;
// The view for the returned tables.
TableView view = 4;
}
// Response message for the ListTables method.

Loading…
Cancel
Save