mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
DOCS-629: Parameters for Replicated engines (#10854)
* Updated parameters description. * CLICKHOUSEDOCS-629: Fixed typo. * CLICKHOUSEDOCS-629: Updated by comment * CLICKHOUSEDOCS-629: Fix. Co-authored-by: Sergei Shtykov <bayonet@yandex-team.ru>
This commit is contained in:
parent
104860b274
commit
948bb81523
@ -85,6 +85,7 @@ The `Replicated` prefix is added to the table engine name. For example:`Replicat
|
||||
|
||||
- `zoo_path` — The path to the table in ZooKeeper.
|
||||
- `replica_name` — The replica name in ZooKeeper.
|
||||
- `other_parameters` — Parameters of an engine which is used for creating the replicated version, for example, version in `ReplacingMergeTree`.
|
||||
|
||||
Example:
|
||||
|
||||
@ -93,8 +94,9 @@ CREATE TABLE table_name
|
||||
(
|
||||
EventDate DateTime,
|
||||
CounterID UInt32,
|
||||
UserID UInt32
|
||||
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}')
|
||||
UserID UInt32,
|
||||
ver UInt16
|
||||
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}', ver)
|
||||
PARTITION BY toYYYYMM(EventDate)
|
||||
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
||||
SAMPLE BY intHash32(UserID)
|
||||
|
@ -80,6 +80,8 @@ ClickHouse хранит метаинформацию о репликах в [Apa
|
||||
|
||||
- `zoo_path` — путь к таблице в ZooKeeper.
|
||||
- `replica_name` — имя реплики в ZooKeeper.
|
||||
- `other_parameters` — параметры движка, для которого создаётся реплицированная версия, например, версия для `ReplacingMergeTree`.
|
||||
|
||||
|
||||
Пример:
|
||||
|
||||
@ -88,8 +90,9 @@ CREATE TABLE table_name
|
||||
(
|
||||
EventDate DateTime,
|
||||
CounterID UInt32,
|
||||
UserID UInt32
|
||||
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}')
|
||||
UserID UInt32,
|
||||
ver UInt16
|
||||
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}', ver)
|
||||
PARTITION BY toYYYYMM(EventDate)
|
||||
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
||||
SAMPLE BY intHash32(UserID)
|
||||
|
Loading…
Reference in New Issue
Block a user