@@ -30,6 +30,14 @@ option go_package = "cloud.google.com/go/bigquery/connection/apiv1/connectionpb;
3030option java_multiple_files = true ;
3131option java_package = "com.google.cloud.bigquery.connection.v1" ;
3232option php_namespace = "Google\\Cloud\\BigQuery\\Connection\\V1" ;
33+ option (google.api.resource_definition ) = {
34+ type : "dataproc.googleapis.com/Cluster"
35+ pattern : "projects/{project}/regions/{region}/clusters/{cluster}"
36+ };
37+ option (google.api.resource_definition ) = {
38+ type : "metastore.googleapis.com/Service"
39+ pattern : "projects/{project}/locations/{location}/services/{service}"
40+ };
3341
3442// Manages external data source connections and credentials.
3543service ConnectionService {
@@ -252,6 +260,9 @@ message Connection {
252260
253261 // Cloud Resource properties.
254262 CloudResourceProperties cloud_resource = 22 ;
263+
264+ // Spark properties.
265+ SparkProperties spark = 23 ;
255266 }
256267
257268 // Output only. The creation timestamp of the connection.
@@ -424,3 +435,59 @@ message CloudResourceProperties {
424435 // <service-1234>@gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com
425436 string service_account_id = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
426437}
438+
439+ // Configuration of the Dataproc Metastore Service.
440+ message MetastoreServiceConfig {
441+ // Optional. Resource name of an existing Dataproc Metastore service.
442+ //
443+ // Example:
444+ //
445+ // * `projects/[project_id]/locations/[region]/services/[service_id]`
446+ string metastore_service = 1 [
447+ (google.api.field_behavior ) = OPTIONAL ,
448+ (google.api.resource_reference ) = {
449+ type : "metastore.googleapis.com/Service"
450+ }
451+ ];
452+ }
453+
454+ // Configuration of the Spark History Server.
455+ message SparkHistoryServerConfig {
456+ // Optional. Resource name of an existing Dataproc Cluster to act as a Spark
457+ // History Server for the connection.
458+ //
459+ // Example:
460+ //
461+ // * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
462+ string dataproc_cluster = 1 [
463+ (google.api.field_behavior ) = OPTIONAL ,
464+ (google.api.resource_reference ) = {
465+ type : "dataproc.googleapis.com/Cluster"
466+ }
467+ ];
468+ }
469+
470+ // Container for connection properties to execute stored procedures for Apache
471+ // Spark.
472+ message SparkProperties {
473+ // Output only. The account ID of the service created for the purpose of this
474+ // connection.
475+ //
476+ // The service account does not have any permissions associated with it when
477+ // it is created. After creation, customers delegate permissions to the
478+ // service account. When the connection is used in the context of a stored
479+ // procedure for Apache Spark in BigQuery, the service account will be used to
480+ // connect to the desired resources in Google Cloud.
481+ //
482+ // The account ID is in the form of:
483+ // bqcx-<projectnumber>-<uniqueid>@gcp-sa-bigquery-consp.iam.gserviceaccount.com
484+ string service_account_id = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
485+
486+ // Optional. Dataproc Metastore Service configuration for the connection.
487+ MetastoreServiceConfig metastore_service_config = 3
488+ [(google.api.field_behavior ) = OPTIONAL ];
489+
490+ // Optional. Spark History Server configuration for the connection.
491+ SparkHistoryServerConfig spark_history_server_config = 4
492+ [(google.api.field_behavior ) = OPTIONAL ];
493+ }
0 commit comments