google-bigquery__execute_sql_readonly
Run a read-only SQL query in the project and return the result. Prefer this tool over
execute_sql if possible.
This tool is restricted to only SELECT statements. INSERT, UPDATE, and DELETE
statements and stored procedures aren't allowed. If the query doesn't include a SELECT
statement, an error is returned. For information on creating queries, see the GoogleSQL
documentation.
IMPORTANT: For predictive and
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"query": "<query>"
},
"name": "google-bigquery__execute_sql_readonly"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Required. The query to execute in the form of a GoogleSQL query. | |
| dryRun | No | Optional. If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false. | |
| labels | No | Optional. The labels associated with this query. Labels can be used to organize and group query jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label keys must start with a letter and each label in the map must have a different key. | |
| projectId | Yes | Required. Project that will be used for query execution and billing. | |
| timeoutMs | No | Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 20 seconds (20,000 milliseconds). | |
| jobTimeoutMs | No | Optional. Optional: Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop the query job. |