Skip to content

Commit 80509f2

Browse files
Google APIscopybara-github
authored andcommitted
feat: add LookerGoldenQuery to Context
PiperOrigin-RevId: 845792138
1 parent 1496716 commit 80509f2

File tree

2 files changed

+50
-32
lines changed

2 files changed

+50
-32
lines changed

google/cloud/geminidataanalytics/v1beta/context.proto

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ message Context {
101101
repeated ExampleQuery example_queries = 5
102102
[(google.api.field_behavior) = OPTIONAL];
103103

104+
// Optional. A list of golden queries, providing examples of relevant and
105+
// commonly used Looker queries and their corresponding natural language
106+
// queries optionally present.
107+
repeated LookerGoldenQuery looker_golden_queries = 11
108+
[(google.api.field_behavior) = OPTIONAL];
109+
104110
// Optional. Term definitions (currently, only user authored)
105111
repeated GlossaryTerm glossary_terms = 8
106112
[(google.api.field_behavior) = OPTIONAL];
@@ -129,6 +135,50 @@ message ExampleQuery {
129135
string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL];
130136
}
131137

138+
// A golden query for Looker, including natural language questions and a
139+
// corresponding Looker Query. Analogous to ExampleQuery.
140+
message LookerGoldenQuery {
141+
// Optional. Natural language questions that a user might ask.
142+
// For example: "How many orders were placed last month?"
143+
repeated string natural_language_questions = 4
144+
[(google.api.field_behavior) = OPTIONAL];
145+
146+
// Optional. The Looker Query corresponding to the natural language questions.
147+
LookerQuery looker_query = 5 [(google.api.field_behavior) = OPTIONAL];
148+
}
149+
150+
// Looker Query Object
151+
// [Looker API
152+
// documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
153+
message LookerQuery {
154+
// A Looker query filter.
155+
message Filter {
156+
// Required. The field to filter on.
157+
string field = 1 [(google.api.field_behavior) = REQUIRED];
158+
159+
// Required. The value for the field to filter on.
160+
string value = 2 [(google.api.field_behavior) = REQUIRED];
161+
}
162+
163+
// Required. The LookML model used to generate the query.
164+
string model = 1 [(google.api.field_behavior) = REQUIRED];
165+
166+
// Required. The LookML explore used to generate the query.
167+
string explore = 2 [(google.api.field_behavior) = REQUIRED];
168+
169+
// Optional. The fields to retrieve from the explore.
170+
repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL];
171+
172+
// Optional. The filters to apply to the explore.
173+
repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL];
174+
175+
// Optional. The sorts to apply to the explore.
176+
repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL];
177+
178+
// Optional. Limit in the query.
179+
optional string limit = 6 [(google.api.field_behavior) = OPTIONAL];
180+
}
181+
132182
// Definition of a term within a specific domain.
133183
message GlossaryTerm {
134184
// Required. User friendly display name of the glossary term being defined.

google/cloud/geminidataanalytics/v1beta/data_chat_service.proto

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -542,38 +542,6 @@ message DataMessage {
542542
}
543543
}
544544

545-
// A query for retrieving data from a Looker Explore. See
546-
// [Run Inline
547-
// Query](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
548-
message LookerQuery {
549-
// A Looker query filter.
550-
message Filter {
551-
// Required. The field to filter on.
552-
string field = 1 [(google.api.field_behavior) = REQUIRED];
553-
554-
// Required. The value f field to filter on.
555-
string value = 2 [(google.api.field_behavior) = REQUIRED];
556-
}
557-
558-
// Required. The LookML model used to generate the query.
559-
string model = 1 [(google.api.field_behavior) = REQUIRED];
560-
561-
// Required. The LookML Explore used to generate the query.
562-
string explore = 2 [(google.api.field_behavior) = REQUIRED];
563-
564-
// Optional. The fields to retrieve from the Explore.
565-
repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL];
566-
567-
// Optional. The filters to apply to the Explore.
568-
repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL];
569-
570-
// Optional. The sorts to apply to the Explore.
571-
repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL];
572-
573-
// Optional. Limit in the query.
574-
optional string limit = 6 [(google.api.field_behavior) = OPTIONAL];
575-
}
576-
577545
// A query for retrieving data.
578546
message DataQuery {
579547
// The type of query to execute.

0 commit comments

Comments
 (0)