Index Actions
Move to ClickHouse
API to initiate the move of a specified index: POST _ism/move_to_click/<index_name>
.
Path Parameters
Name | Type | Description |
---|---|---|
index_name | string | The name of the index to be moved |
Request Body Parameters
Name | Type | Description |
---|---|---|
connection_id | string | The connection identifier for the ClickHouse instance through which the move will be performed |
index_name_pattern | string | A regular expression pattern for extracting the table name, which must contain a named group (?<name>) |
fetch_size | integer | The batch size for processing documents. The recommended value is between 10000 and 100000, depending on the document size |
data_scheme_parameters | object | Additional settings that affect the interaction with the table in ClickHouse |
Schema data_scheme_parameters
Name | Type | Description |
---|---|---|
ttl_interval | string | The Time-To-Live interval for documents in the table, in the format interval <count> <time unit> Доступные интервалы (set for the entire table upon creation) |
ttl_column | string | The name of a datetime-type field used as the basis for ttl calculation |
cluster_name | string | The ClickHouse cluster name (a required field if replication = true or distributed = true ) |
replication | boolean | A flag for creating a replicated table during the data transfer (considered if the move operation triggers the creation of a new table) |
distributed | boolean | A flag for creating a distributed table during the data transfer (considered if the move operation triggers the creation of a new table) |
Example Request
POST _ism/move_to_click/clickhouse_test-600006
{
"connection_id": "TestClick",
"index_name_pattern": "(?<name>.*?)-\\d+",
"fetch_size": 100000,
"data_scheme_parameters": {
"ttl_interval": "interval 30 day",
"cluster_name": "sm_cluster",
"replication": true,
"distributed": true
}
}