Engine To Replicated Merge Tree
Easily change your table engine to replicated merge tree.
Change a table engine on a cluster to ReplicatedMergeTree
Provide the API with a cluster slug, information for the ReplicatedMergeTree engine configuration and a table name.
- Curl
- Python
curl -X 'PATCH' \
'https://api.gigapipe.com/v1/clusters/<your_cluster_slug>/tables/{table_name}/replicated-merge-tree-engine' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"partition_by": "partition_expression",
"order_by": "my_colum[,my_colum_2]",
"database_name": "my_database_name",
"path": "path_to_engine"
}'
# Payload response ::Dictionary
{
"message": "Table engine changed to replicated merge tree: <>"
}
response = gigapipe_client.clusters.engine_to_replicated_merge_tree(
"cluster-test",
table_name="clickhouse_table",
payload={
"partition_by": "my_column_name, my_other_column_name",
"order_by": "my_column_name, my_other_column_name",
"database_name": "my_database_name",
"path": "path_to_new_engine" # Optional: If no path is chosen, a default path is defined automatically
})
# Payload response ::Dictionary
{
"message": "Table engine changed to replicated merge tree: <>"
}
Change table engine to ReplicatedMergeTree payload
Attributes
partition_by ::String
Partition expression for the new ReplicatedMergeTree engine
order_by ::String
A string consisting of one or more column names to order the data by
database_name ::String
The name of the database where the table is found
path ::String
An optional path for the new engine, if none is chosen, Gigapipe will define a default for you
Change ClickHouse version response
Attributes
message ::String
A basic response message