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:
BayoNet 2020-05-14 19:07:13 +03:00 committed by GitHub
parent 104860b274
commit 948bb81523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -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)

View File

@ -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)