8000 feat: You can now configure listings for multiple regions for shared … · googleapis/googleapis@b495659 · GitHub
[go: up one dir, main page]

Skip to content

Commit b495659

Browse files
Google APIscopybara-github
authored andcommitted
feat: You can now configure listings for multiple regions for shared datasets and linked dataset replicas in BigQuery sharing
docs:Add new category GOOGLE EARTH ENGINE and Increase limit of max Categories per Listing to 5 For more information, see [Create a listing](https://cloud.google.com/bigquery/docs/analytics-hub-manage-listings#create_a_listing). This feature is in [preview](https://cloud.google.com/products#product-launch-stages) PiperOrigin-RevId: 802216997
1 parent d300b15 commit b495659

File tree

1 file changed

+330
-1
lines changed

1 file changed

+330
-1
lines changed

google/cloud/bigquery/analyticshub/v1/analyticshub.proto

Lines changed: 330 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,70 @@ service AnalyticsHubService {
315315
}
316316
};
317317
}
318+
319+
// Creates a new QueryTemplate
320+
rpc CreateQueryTemplate(CreateQueryTemplateRequest) returns (QueryTemplate) {
321+
option (google.api.http) = {
322+
post: "/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates"
323+
body: "query_template"
324+
};
325+
option (google.api.method_signature) =
326+
"parent,query_template,query_template_id";
327+
}
328+
329+
// Gets a QueryTemplate
330+
rpc GetQueryTemplate(GetQueryTemplateRequest) returns (QueryTemplate) {
331+
option (google.api.http) = {
332+
get: "/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}"
333+
};
334+
option (google.api.method_signature) = "name";
335+
}
336+
337+
// Lists all QueryTemplates in a given project and location.
338+
rpc ListQueryTemplates(ListQueryTemplatesRequest)
339+
returns (ListQueryTemplatesResponse) {
340+
option (google.api.http) = {
341+
get: "/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates"
342+
};
343+
option (google.api.method_signature) = "parent";
344+
}
345+
346+
// Updates an existing QueryTemplate
347+
rpc UpdateQueryTemplate(UpdateQueryTemplateRequest) returns (QueryTemplate) {
348+
option (google.api.http) = {
349+
patch: "/v1/{query_template.name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}"
350+
body: "query_template"
351+
};
352+
option (google.api.method_signature) = "query_template,update_mask";
353+
}
354+
355+
// Deletes a query template.
356+
rpc DeleteQueryTemplate(DeleteQueryTemplateRequest)
357+
returns (google.protobuf.Empty) {
358+
option (google.api.http) = {
359+
delete: "/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}"
360+
};
361+
option (google.api.method_signature) = "name";
362+
}
363+
364+
// Submits a query template for approval.
365+
rpc SubmitQueryTemplate(SubmitQueryTemplateRequest) returns (QueryTemplate) {
366+
option (google.api.http) = {
367+
post: "/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:submit"
368+
body: "*"
369+
};
370+
option (google.api.method_signature) = "name";
371+
}
372+
373+
// Approves a query template.
374+
rpc ApproveQueryTemplate(ApproveQueryTemplateRequest)
375+
returns (QueryTemplate) {
376+
option (google.api.http) = {
377+
post: "/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:approve"
378+
body: "*"
379+
};
380+
option (google.api.method_signature) = "name";
381+
}
318382
}
319383

320384
// Specifies the type of discovery on the discovery page. Note that
@@ -404,6 +468,209 @@ message DataExchange {
404468
[(google.api.field_behavior) = OPTIONAL];
405469
}
406470

471+
// A query template is a container for sharing table-valued functions defined by
472+
// contributors in a data clean room.
473+
message QueryTemplate {
474+
option (google.api.resource) = {
475+
type: "analyticshub.googleapis.com/QueryTemplate"
476+
pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}"
477+
plural: "queryTemplates"
478+
singular: "queryTemplate"
479+
};
480+
481+
// The QueryTemplate lifecycle state.
482+
enum State {
483+
// Default value. This value is unused.
484+
STATE_UNSPECIFIED = 0;
485+
486+
// The QueryTemplate is in draft state.
487+
DRAFTED = 1;
488+
489+
// The QueryTemplate is in pending state.
490+
PENDING = 2;
491+
492+
// The QueryTemplate is in deleted state.
493+
DELETED = 3;
494+
495+
// The QueryTemplate is in approved state.
496+
APPROVED = 4;
497+
}
498+
499+
// Output only. The resource name of the QueryTemplate.
500+
// e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456`
501+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
502+
503+
// Required. Human-readable display name of the QueryTemplate. The display
504+
// name must contain only Unicode letters, numbers (0-9), underscores (_),
505+
// dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces.
506+
// Default value is an empty string. Max length: 63 bytes.
507+
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
508+
509+
// Optional. Short description of the QueryTemplate. The description must not
510+
// contain Unicode non-characters and C0 and C1 control codes except tabs
511+
// (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default
512+
// value is an empty string. Max length: 2000 bytes.
513+
string description = 3 [(google.api.field_behavior) = OPTIONAL];
514+
515+
// Optional. Will be deprecated.
516+
// Email or URL of the primary point of contact of the QueryTemplate.
517+
// Max Length: 1000 bytes.
518+
string proposer = 4 [(google.api.field_behavior) = OPTIONAL];
519+
520+
// Optional. Email or URL of the primary point of contact of the
521+
// QueryTemplate. Max Length: 1000 bytes.
522+
string primary_contact = 10 [(google.api.field_behavior) = OPTIONAL];
523+
524+
// Optional. Documentation describing the QueryTemplate.
525+
string documentation = 5 [(google.api.field_behavior) = OPTIONAL];
526+
527+
// Output only. The QueryTemplate lifecycle state.
528+
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
529+
530+
// Optional. The routine associated with the QueryTemplate.
531+
Routine routine = 7 [(google.api.field_behavior) = OPTIONAL];
532+
533+
// Output only. Timestamp when the QueryTemplate was created.
534+
google.protobuf.Timestamp create_time = 8
535+
[(google.api.field_behavior) = OUTPUT_ONLY];
536+
537+
// Output only. Timestamp when the QueryTemplate was last modified.
538+
google.protobuf.Timestamp update_time = 9
539+
[(google.api.field_behavior) = OUTPUT_ONLY];
540+
}
541+
542+
// Represents a bigquery routine.
543+
message Routine {
544+
// Represents the type of a given routine.
545+
enum RoutineType {
546+
// Default value.
547+
ROUTINE_TYPE_UNSPECIFIED = 0;
548+
549+
// Non-built-in persistent TVF.
550+
TABLE_VALUED_FUNCTION = 1;
551+
}
552+
553+
// Required. The type of routine.
554+
RoutineType routine_type = 1 [(google.api.field_behavior) = REQUIRED];
555+
556+
// Optional. The definition body of the routine.
557+
string definition_body = 2 [(google.api.field_behavior) = OPTIONAL];
558+
}
559+
560+
// Message for creating a QueryTemplate.
561+
message CreateQueryTemplateRequest {
562+
// Required. The parent resource path of the QueryTemplate.
563+
// e.g.
564+
// `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`.
565+
string parent = 1 [
566+
(google.api.field_behavior) = REQUIRED,
567+
(google.api.resource_reference) = {
568+
type: "analyticshub.googleapis.com/DataExchange"
569+
}
570+
];
571+
572+
// Required. The ID of the QueryTemplate to create.
573+
// Must contain only Unicode letters, numbers (0-9), underscores (_).
574+ // Max length: 100 bytes.
575+
string query_template_id = 2 [(google.api.field_behavior) = REQUIRED];
576+
577+
// Required. The QueryTemplate to create.
578+
QueryTemplate query_template = 3 [(google.api.field_behavior) = REQUIRED];
579+
}
580+
581+
// Message for creating a QueryTemplate.
582+
message GetQueryTemplateRequest {
583+
// Required. The parent resource path of the QueryTemplate.
584+
// e.g.
585+
// `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
586+
string name = 1 [
587+
(google.api.field_behavior) = REQUIRED,
588+
(google.api.resource_reference) = {
589+
type: "analyticshub.googleapis.com/QueryTemplate"
590+
}
591+
];
592+
}
593+
594+
// Message for requesting the list of QueryTemplates.
595+
message ListQueryTemplatesRequest {
596+
// Required. The parent resource path of the QueryTemplates.
597+
// e.g. `projects/myproject/locations/us/dataExchanges/123`.
598+
string parent = 1 [
599+
(google.api.field_behavior) = REQUIRED,
600+
(google.api.resource_reference) = {
601+
type: "analyticshub.googleapis.com/DataExchange"
602+
}
603+
];
604+
605+
// Optional. The maximum number of results to return in a single response
606+
// page. Leverage the page tokens to iterate through the entire collection.
607+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
608+
609+
// Optional. Page token, returned by a previous call, to request the next page
610+
// of results.
611+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
612+
}
613+
614+
// Message for response to the list of QueryTemplates.
615+
message ListQueryTemplatesResponse {
616+
// The list of QueryTemplates.
617+
repeated QueryTemplate query_templates = 1;
618+
619+
// A token to request the next page of results.
620+
string next_page_token = 2;
621+
}
622+
623+
// Message for updating a QueryTemplate.
624+
message UpdateQueryTemplateRequest {
625+
// Optional. Field mask specifies the fields to update in the query template
626+
// resource. The fields specified in the `updateMask` are relative to the
627+
// resource and are not a full request.
628+
google.protobuf.FieldMask update_mask = 1
629+
[(google.api.field_behavior) = OPTIONAL];
630+
631+
// Required. The QueryTemplate to update.
632+
QueryTemplate query_template = 2 [(google.api.field_behavior) = REQUIRED];
633+
}
634+
635+
// Message for deleting a QueryTemplate.
636+
message DeleteQueryTemplateRequest {
637+
// Required. The resource path of the QueryTemplate.
638+
// e.g.
639+
// `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
640+
string name = 1 [
641+
(google.api.field_behavior) = REQUIRED,
642+
(google.api.resource_reference) = {
643+
type: "analyticshub.googleapis.com/QueryTemplate"
644+
}
645+
];
646+
}
647+
648+
// Message for submitting a QueryTemplate.
649+
message SubmitQueryTemplateRequest {
650+
// Required. The resource path of the QueryTemplate.
651+
// e.g.
652+
// `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
653+
string name = 1 [
654+
(google.api.field_behavior) = REQUIRED,
655+
(google.api.resource_reference) = {
656+
type: "analyticshub.googleapis.com/QueryTemplate"
657+
}
658+
];
659+
}
660+
661+
// Message for approving a QueryTemplate.
662+
message ApproveQueryTemplateRequest {
663+
// Required. The resource path of the QueryTemplate.
664+
// e.g.
665+
// `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
666+
string name = 1 [
667+
(google.api.field_behavior) = REQUIRED,
668+
(google.api.resource_reference) = {
669+
type: "analyticshub.googleapis.com/QueryTemplate"
670+
}
671+
];
672+
}
673+
407674
// Sharing environment is a behavior model for sharing data within a
408675
// data exchange. This option is configurable for a data exchange.
409676
message SharingEnvironmentConfig {
@@ -494,6 +761,12 @@ message DestinationDataset {
494761
// https://cloud.google.com/bigquery/docs/locations for supported
495762
// locations.
496763
string location = 5 [(google.api.field_behavior) = REQUIRED];
764+
765+
// Optional. The geographic locations where the dataset should be replicated.
766+
// See [BigQuery locations](https://cloud.google.com/bigquery/docs/locations)
767+
// for supported locations.
768+
repeated string replica_locations = 6
769+
[(google.api.field_behavior) = OPTIONAL];
497770
}
498771

499772
// Defines the destination Pub/Sub subscription.
@@ -566,6 +839,48 @@ message Listing {
566839
[(google.api.field_behavior) = OPTIONAL];
567840
}
568841

842+
// Represents the state of a replica of a shared dataset.
843+
// It includes the geographic location of the replica and
844+
// system-computed, output-only fields indicating its replication state and
845+
// whether it is the primary replica.
846+
message Replica {
847+
// Replica state of the shared dataset.
848+
enum ReplicaState {
849+
// Default value. This value is unused.
850+
REPLICA_STATE_UNSPECIFIED = 0;
851+
852+
// The replica is backfilled and ready to use.
853+
READY_TO_USE = 1;
854+
855+
// The replica is unavailable, does not exist, or has not been
856+
// backfilled yet.
857+
UNAVAILABLE = 2;
858+
}
859+
860+
// Primary state of the replica. Set only for the primary replica.
861+
enum PrimaryState {
862+
// Default value. This value is unused.
863+
PRIMARY_STATE_UNSPECIFIED = 0;
864+
865+
// The replica is the primary replica.
866+
PRIMARY_REPLICA = 1;
867+
}
868+
869+
// Output only. The geographic location where the replica resides. See
870+
// [BigQuery locations](https://cloud.google.com/bigquery/docs/locations)
871+
// for supported locations. Eg. "us-central1".
872+
string location = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
873+
874+
// Output only. Assigned by Analytics Hub based on real BigQuery
875+
// replication state.
876+
ReplicaState replica_state = 2
877+
[(google.api.field_behavior) = OUTPUT_ONLY];
878+
879+
// Output only. Indicates that this replica is the primary replica.
880+
optional PrimaryState primary_state = 3
881+
[(google.api.field_behavior) = OUTPUT_ONLY];
882+
}
883+
569884
// Optional. Resource name of the dataset source for this listing.
570885
// e.g. `projects/myproject/datasets/123`
571886
string dataset = 1 [
@@ -584,6 +899,18 @@ message Listing {
584899
// enforced on the linked dataset.
585900
RestrictedExportPolicy restricted_export_policy = 3
586901
[(google.api.field_behavior) = OPTIONAL];
902+
903+
// Optional. A list of regions where the publisher has created shared
904+
// dataset replicas.
905+
repeated string replica_locations = 5
906+
[(google.api.field_behavior) = OPTIONAL];
907+
908+
// Output only. Server-owned effective state of replicas.
909+
// Contains both primary and secondary replicas.
910+
// Each replica includes a system-computed (output-only) state and primary
911+
// designation.
912+
repeated Replica effective_replicas = 6
913+
[(google.api.field_behavior) = OUTPUT_ONLY];
587914
}
588915

589916
// Pub/Sub topic source.
@@ -707,6 +1034,8 @@ message Listing {
7071034
CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18;
7081035

7091036
CATEGORY_TRAVEL_AND_TOURISM = 19;
1037+
1038+
CATEGORY_GOOGLE_EARTH_ENGINE = 20;
7101039
}
7111040

7121041
// Listing source.
@@ -754,7 +1083,7 @@ message Listing {
7541083
// Optional. Details of the data provider who owns the source data.
7551084
DataProvider data_provider = 9 [(google.api.field_behavior) = OPTIONAL];
7561085

757-
// Optional. Categories of the listing. Up to two categories are allowed.
1086+
// Optional. Categories of the listing. Up to five categories are allowed.
7581087
repeated Category categories = 10 [(google.api.field_behavior) = OPTIONAL];
7591088

7601089
// Optional. Details of the publisher who owns the listing and who can share

0 commit comments

Comments
 (0)
0