Update DataLens dataset
datalens_datasets_updateSave a DataLens dataset by replacing its entire content with provided data. Validate changes first and re-read after saving to avoid stale revisions.
Instructions
Save a dataset as given: read it, change what it holds, send it back whole.
data.dataset replaces the content. Check a change first with datasets_validate.
Read the dataset again after every save: content of an older revision is refused.
The reply holds the content and the revisions; its id is null (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": {
"dataset_id": "<dataset_id>",
"data": "<data>"
},
"name": "datalens_datasets_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The content to save (`dataset`) and how (`mode`: `save` or `publish`). Its schema is not listed here: read `DatasetUpdate` with schema_get(service="datalens", name="DatasetUpdate"), then the definitions it refers to. | |
| dry_run | No | Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none). | |
| dataset_id | Yes | Dataset id. | |
| workbook_id | No | The workbook the dataset lies in. |