This commit is contained in:
shenjian@fangjia.com
2023-04-23 13:51:39 +08:00
parent b915e1fe1b
commit 0b5dff7111
3 changed files with 52 additions and 29 deletions
+27
View File
@@ -0,0 +1,27 @@
create table etl.region_local on cluster fangjia (
province_code String,
fangjia_province String,
province_name String,
city_code String,
city_name String,
fangjia_city String,
region_code String,
fangjia_area String,
region_name String
)
ENGINE MergeTree()
PARTITION BY province_code PRIMARY KEY (region_code) ORDER BY (region_code);
CREATE TABLE etl.region_shard ON CLUSTER fangjia
(
province_code String,
fangjia_province String,
province_name String,
city_code String,
city_name String,
fangjia_city String,
region_code String,
fangjia_area String,
region_name String
) ENGINE=Distributed(fangjia, etl, region_local, hiveHash(province_code))