Update Table
update-tableChange an existing RawTree table's sorting key, row-deletion TTL, or engine settings safely. Confirm the table and configuration changes before applying them.
Instructions
Purpose: Change the sorting key, row-deletion TTL, or engine settings of an existing RawTree table.
NOT for: Renaming a table, adding columns, or changing storage.
Returns: The database and table names plus current sorting_key, ttl (stored expression or null), and settings (explicit {name, value} entries with SQL values and secrets masked by the engine).
Behavior: Provide a comma-separated SQL expression string in key order, lowest cardinality first. A bare name such as user.id is read as a path into the ingested JSON. The new key applies to newly inserted parts and wins later merges, so existing parts are re-sorted in the background instead of being rewritten by this call. Call describe-table first to see the current key.
Limits: The key must contain at least one expression; a table's sorting key cannot be removed once set. RawTree validates the SQL expressions and the engine may reject an unusable key.
Configuration: Provide exactly one of sortingKey, ttl, or nonempty settings per call. Omitted fields and setting names remain unchanged. ttl sets or replaces row-deletion retention; null and empty strings cannot remove it. settings changes supplied engine settings using literal scalar values; this route cannot reset settings.
Auth: Requires organization admin access. Authorization is enforced by the RawTree API.
Safety: You MUST confirm the exact table name and configuration changes with the user before calling this tool. TTL can delete data.
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": {
"table": "<table>"
},
"name": "update-table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Row-deletion TTL SQL expression, optionally followed by DELETE WHERE <condition>. Subqueries and other TTL actions are unsupported. Omit to leave unchanged on update; null and empty strings cannot remove TTL. | |
| table | Yes | Table name to update. | |
| cluster | No | RawTree cluster to use for this operation. | |
| database | No | Optional RawTree database override. RawTree uses the default database when omitted. | |
| settings | No | Engine settings as JSON scalar values. Strings are literal values, not SQL expressions. Updates change supplied settings only; omitted settings are preserved. This route cannot reset settings. | |
| sortingKey | No | Comma-separated SQL sorting expressions in key order, for example "region, ifNull(cityHash64(host, instanceId), 0)". A bare name such as "user.id" is read as a path into the ingested JSON. | |
| organization | No | RawTree organization containing the target cluster. |