|
|
|
@ -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. |
|
|
|
|