Skip to main content
Version: 5.0

Index Actions

Move to ClickHouse

API to initiate the move of a specified index: POST _ism/move_to_click/<index_name>.

Path Parameters

NameTypeDescription
index_namestringThe name of the index to be moved

Request Body Parameters

NameTypeDescription
connection_idstringThe connection identifier for the ClickHouse instance through which the move will be performed
index_name_patternstringA regular expression pattern for extracting the table name, which must contain a named group (?<name>)
fetch_sizeintegerThe batch size for processing documents. The recommended value is between 10000 and 100000, depending on the document size
data_scheme_parametersobjectAdditional settings that affect the interaction with the table in ClickHouse

Schema data_scheme_parameters

NameTypeDescription
ttl_intervalstringThe Time-To-Live interval for documents in the table, in the format interval <count> <time unit> Доступные интервалы (set for the entire table upon creation)
ttl_columnstringThe name of a datetime-type field used as the basis for ttl calculation
cluster_namestringThe ClickHouse cluster name (a required field if replication = true or distributed = true)
replicationbooleanA flag for creating a replicated table during the data transfer (considered if the move operation triggers the creation of a new table)
distributedbooleanA 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
}
}