@@ -238,6 +238,48 @@ service DataprocMetastore {
238238 metadata_type : "google.cloud.metastore.v1.OperationMetadata"
239239 };
240240 }
241+
242+ // Query DPMS metadata.
243+ rpc QueryMetadata (QueryMetadataRequest )
244+ returns (google.longrunning.Operation ) {
245+ option (google.api.http ) = {
246+ post : "/v1/{service=projects/*/locations/*/services/*}:queryMetadata"
247+ body : "*"
248+ };
249+ option (google.longrunning.operation_info ) = {
250+ response_type : "QueryMetadataResponse"
251+ metadata_type : "google.cloud.metastore.v1.OperationMetadata"
252+ };
253+ }
254+
255+ // Move a table to another database.
256+ rpc MoveTableToDatabase (MoveTableToDatabaseRequest )
257+ returns (google.longrunning.Operation ) {
258+ option (google.api.http ) = {
259+ post : "/v1/{service=projects/*/locations/*/services/*}:moveTableToDatabase"
260+ body : "*"
261+ };
262+ option (google.longrunning.operation_info ) = {
263+ response_type : "MoveTableToDatabaseResponse"
264+ metadata_type : "google.cloud.metastore.v1.OperationMetadata"
265+ };
266+ }
267+
268+ // Alter metadata resource location. The metadata resource can be a database,
269+ // table, or partition. This functionality only updates the parent directory
270+ // for the respective metadata resource and does not transfer any existing
271+ // data to the new location.
272+ rpc AlterMetadataResourceLocation (AlterMetadataResourceLocationRequest )
273+ returns (google.longrunning.Operation ) {
274+ option (google.api.http ) = {
275+ post : "/v1/{service=projects/*/locations/*/services/*}:alterLocation"
276+ body : "*"
277+ };
278+ option (google.longrunning.operation_info ) = {
279+ response_type : "AlterMetadataResourceLocationResponse"
280+ metadata_type : "google.cloud.metastore.v1.OperationMetadata"
281+ };
282+ }
241283}
242284
243285// A managed metastore service that serves metadata queries.
@@ -425,6 +467,18 @@ message MaintenanceWindow {
425467// Specifies configuration information specific to running Hive metastore
426468// software as the metastore service.
427469message HiveMetastoreConfig {
470+ // Protocols available for serving the metastore service endpoint.
471+ enum EndpointProtocol {
472+ // The protocol is not set.
473+ ENDPOINT_PROTOCOL_UNSPECIFIED = 0 ;
474+
475+ // Use the legacy Apache Thrift protocol for the metastore service endpoint.
476+ THRIFT = 1 ;
477+
478+ // Use the modernized gRPC protocol for the metastore service endpoint.
479+ GRPC = 2 ;
480+ }
481+
428482 // Immutable. The Hive metastore schema version.
429483 string version = 1 [(google.api.field_behavior ) = IMMUTABLE ];
430484
@@ -442,6 +496,10 @@ message HiveMetastoreConfig {
442496 // while omitting this field from the request's `service`.
443497 KerberosConfig kerberos_config = 3 ;
444498
499+ // The protocol to use for the metastore service endpoint. If unspecified,
500+ // defaults to `THRIFT`.
501+ EndpointProtocol endpoint_protocol = 4 ;
502+
445503 // A mapping of Hive metastore version to the auxiliary version
446504 // configuration. When specified, a secondary Hive metastore service is
447505 // created along with the primary service. All auxiliary versions must be less
@@ -592,6 +650,9 @@ message MetadataImport {
592650 // to import metadata. It must begin with `gs://`.
593651 string gcs_uri = 2 ;
594652
653+ // The name of the source database.
654+ string source_database = 3 [deprecated = true ];
655+
595656 // Optional. The type of the database dump. If unspecified, defaults to
596657 // `MYSQL`.
597658 DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior ) = OPTIONAL ];
@@ -1441,3 +1502,101 @@ message DatabaseDumpSpec {
14411502 AVRO = 2 ;
14421503 }
14431504}
1505+
1506+ // Request message for
1507+ // [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
1508+ message QueryMetadataRequest {
1509+ // Required. The relative resource name of the metastore service to query
1510+ // metadata, in the following format:
1511+ //
1512+ // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1513+ string service = 1 [
1514+ (google.api.field_behavior ) = REQUIRED ,
1515+ (google.api.resource_reference ) = {
1516+ type : "metastore.googleapis.com/Service"
1517+ }
1518+ ];
1519+
1520+ // Required. A read-only SQL query to execute against the metadata database.
1521+ // The query cannot change or mutate the data.
1522+ string query = 2 [(google.api.field_behavior ) = REQUIRED ];
1523+ }
1524+
1525+ // Response message for
1526+ // [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
1527+ message QueryMetadataResponse {
1528+ // The manifest URI is link to a JSON instance in Cloud Storage.
1529+ // This instance manifests immediately along with QueryMetadataResponse. The
1530+ // content of the URI is not retriable until the long-running operation query
1531+ // against the metadata finishes.
1532+ string result_manifest_uri = 1 ;
1533+ }
1534+
1535+ // Error details in public error message for
1536+ // [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
1537+ message ErrorDetails {
1538+ // Additional structured details about this error.
1539+ //
1540+ // Keys define the failure items.
1541+ // Value describes the exception or details of the item.
1542+ map <string , string > details = 1 ;
1543+ }
1544+
1545+ // Request message for
1546+ // [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1.DataprocMetastore.MoveTableToDatabase].
1547+ message MoveTableToDatabaseRequest {
1548+ // Required. The relative resource name of the metastore service to mutate
1549+ // metadata, in the following format:
1550+ //
1551+ // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1552+ string service = 1 [
1553+ (google.api.field_behavior ) = REQUIRED ,
1554+ (google.api.resource_reference ) = {
1555+ type : "metastore.googleapis.com/Service"
1556+ }
1557+ ];
1558+
1559+ // Required. The name of the table to be moved.
1560+ string table_name = 2 [(google.api.field_behavior ) = REQUIRED ];
1561+
1562+ // Required. The name of the database where the table resides.
1563+ string db_name = 3 [(google.api.field_behavior ) = REQUIRED ];
1564+
1565+ // Required. The name of the database where the table should be moved.
1566+ string destination_db_name = 4 [(google.api.field_behavior ) = REQUIRED ];
1567+ }
1568+
1569+ // Response message for
1570+ // [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1.DataprocMetastore.MoveTableToDatabase].
1571+ message MoveTableToDatabaseResponse {}
1572+
1573+ // Request message for
1574+ // [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1.DataprocMetastore.AlterMetadataResourceLocation].
1575+ message AlterMetadataResourceLocationRequest {
1576+ // Required. The relative resource name of the metastore service to mutate
1577+ // metadata, in the following format:
1578+ //
1579+ // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1580+ string service = 1 [
1581+ (google.api.field_behavior ) = REQUIRED ,
1582+ (google.api.resource_reference ) = {
1583+ type : "metastore.googleapis.com/Service"
1584+ }
1585+ ];
1586+
1587+ // Required. The relative metadata resource name in the following format.
1588+ //
1589+ // `databases/{database_id}`
1590+ // or
1591+ // `databases/{database_id}/tables/{table_id}`
1592+ // or
1593+ // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
1594+ string resource_name = 2 [(google.api.field_behavior ) = REQUIRED ];
1595+
1596+ // Required. The new location URI for the metadata resource.
1597+ string location_uri = 3 [(google.api.field_behavior ) = REQUIRED ];
1598+ }
1599+
1600+ // Response message for
1601+ // [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1.DataprocMetastore.AlterMetadataResourceLocation].
1602+ message AlterMetadataResourceLocationResponse {}
0 commit comments