Reference documentation and code samples for the Google Cloud Gemini Data Analytics V1 Client class ExampleQuery.
Example of relevant and commonly used SQL query and its corresponding natural language queries optionally present. Currently only used for BigQuery data sources.
Generated from protobuf message google.cloud.geminidataanalytics.v1.ExampleQuery
Namespace
Google \ Cloud \ GeminiDataAnalytics \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ sql_query |
string
Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'" |
↳ natural_language_question |
string
Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?" |
↳ parameters |
array<QueryParameter>
Optional. The list of query parameters. Example: The parameterized SQL query "SELECT * FROM my_table WHERE id = @id" can be matched with any value of id. |
getSqlQuery
Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSqlQuery
setSqlQuery
Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getNaturalLanguageQuestion
Optional. A natural language question that a user might ask.
For example: "How many orders were placed last month?"
| Returns | |
|---|---|
| Type | Description |
string |
|
setNaturalLanguageQuestion
Optional. A natural language question that a user might ask.
For example: "How many orders were placed last month?"
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getParameters
Optional. The list of query parameters.
Example: The parameterized SQL query "SELECT * FROM my_table WHERE id = @id" can be matched with any value of id.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<QueryParameter> |
|
setParameters
Optional. The list of query parameters.
Example: The parameterized SQL query "SELECT * FROM my_table WHERE id = @id" can be matched with any value of id.
| Parameter | |
|---|---|
| Name | Description |
var |
array<QueryParameter>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getQuery
| Returns | |
|---|---|
| Type | Description |
string |
|