кластере как CREATE NEWTABLE AS OLDTABLE?
Как пример:
CREATE TABLE dwh.journal AS dwh.new_journal ON CLUSTER dt_ch_cluster
можно, но если таблица Replicated , то надо передавать еще и Engine. create table test_move on cluster segmented (A Int64, B Int64) Engine = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{table}', '{replica}') order by A partition by B; OK create table test_move1 on cluster segmented as test_move; Code: 253. DB::Exception: Replica /clickhouse/oCHDWcsp1/tables/test_move/replicas/r1 already exists. (REPLICA_IS_ALREADY_EXIST) (version 22.3.6.5 (official build)) create table test_move1 on cluster segmented as test_move Engine = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{table}', '{replica}') order by A partition by B; OK
Получилось, спасибо!
Обсуждают сегодня