Update DataLens saved SQL query
datalens_sqlqueries_updateUpdate a DataLens SQL query using its ID, connection, and query text, then return the saved query.
Instructions
Save a SQL query anew and return it; the connection and the text go every time.
Experimental in the DataLens API and written from its document: not measured.
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": {
"sql_query_id": "<sql_query_id>",
"connection_id": "<connection_id>",
"query": "<query>"
},
"name": "datalens_sqlqueries_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The text of the query. | |
| params | No | The parameters the text takes. | |
| dry_run | No | Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none). | |
| description | No | A description. | |
| sql_query_id | Yes | SQL query id. | |
| connection_id | Yes | The connection it runs over: PostgreSQL, ClickHouse, MySQL, Greenplum, Trino. |