diff options
| author | doufenghu <[email protected]> | 2019-07-03 15:46:17 +0800 |
|---|---|---|
| committer | doufenghu <[email protected]> | 2019-07-03 15:46:17 +0800 |
| commit | 91ad40557a92ee6feabd07cd87229fbae30450b5 (patch) | |
| tree | 8cd03108f1fe22f1cf463bf0d451340993468569 /TSG | |
| parent | 6f088bbc02ddd313dd92dc0a4176edc59fc0542f (diff) | |
TSG修改clickhouse表
Diffstat (limited to 'TSG')
| -rw-r--r-- | TSG/clickhouse-tsg.txt | 25 | ||||
| -rw-r--r-- | TSG/home.md | 4 |
2 files changed, 15 insertions, 14 deletions
diff --git a/TSG/clickhouse-tsg.txt b/TSG/clickhouse-tsg.txt index 8d8661c..7a24693 100644 --- a/TSG/clickhouse-tsg.txt +++ b/TSG/clickhouse-tsg.txt @@ -1,5 +1,6 @@ -CREATE TABLE IF NOT EXISTS tsg_galaxy.session_record_log_local on cluster tsg_galaxy( + +CREATE TABLE IF NOT EXISTS tsg_galaxy.session_record_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -81,7 +82,7 @@ ORDER BY recv_time; -CREATE TABLE IF NOT EXISTS tsg_galaxy.policy_event_log_local on cluster tsg_galaxy( +CREATE TABLE IF NOT EXISTS tsg_galaxy.policy_event_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -159,7 +160,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy.policy_event_log_local on cluster tsg_gala ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(recv_time)) ORDER BY (recv_time); -CREATE TABLE IF NOT EXISTS tsg_galaxy.radius_log_local on cluster tsg_galaxy( +CREATE TABLE IF NOT EXISTS tsg_galaxy.radius_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -238,7 +239,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy.radius_log_local on cluster tsg_galaxy( ORDER BY (recv_time); -CREATE TABLE IF NOT EXISTS ntc_galaxy.session_record_log_local on cluster tsg_galaxy( +CREATE TABLE IF NOT EXISTS ntc_galaxy.session_record_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -320,7 +321,7 @@ ORDER BY recv_time; -CREATE TABLE IF NOT EXISTS ntc_galaxy.policy_event_log_local on cluster tsg_galaxy( +CREATE TABLE IF NOT EXISTS ntc_galaxy.policy_event_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -398,7 +399,7 @@ CREATE TABLE IF NOT EXISTS ntc_galaxy.policy_event_log_local on cluster tsg_gala ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(recv_time)) ORDER BY (recv_time); -CREATE TABLE IF NOT EXISTS ntc_galaxy.radius_log_local on cluster tsg_galaxy( +CREATE TABLE IF NOT EXISTS ntc_galaxy.radius_log_local on cluster ck_cluster( policy_id Int64, user_tags String, action Int64, @@ -475,12 +476,12 @@ CREATE TABLE IF NOT EXISTS ntc_galaxy.radius_log_local on cluster tsg_galaxy( packet_type Int64 ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(recv_time)) ORDER BY (recv_time); -create TABLE IF NOT EXISTS tsg_galaxy.radius_log AS tsg_galaxy.radius_log_local ENGINE =Distributed(tsg_galaxy,tsg_galaxy,radius_log_local,rand()); -create TABLE IF NOT EXISTS tsg_galaxy.policy_event_log AS tsg_galaxy.policy_event_log_local ENGINE =Distributed(tsg_galaxy,tsg_galaxy,policy_event_log_local,rand()); -create TABLE IF NOT EXISTS tsg_galaxy.session_record_log AS tsg_galaxy.session_record_log_local ENGINE =Distributed(tsg_galaxy,tsg_galaxy,session_record_log_local,rand()); +create TABLE IF NOT EXISTS tsg_galaxy.radius_log AS tsg_galaxy.radius_log_local ENGINE =Distributed(ck_cluster,tsg_galaxy,radius_log_local,rand()); +create TABLE IF NOT EXISTS tsg_galaxy.policy_event_log AS tsg_galaxy.policy_event_log_local ENGINE =Distributed(ck_cluster,tsg_galaxy,policy_event_log_local,rand()); +create TABLE IF NOT EXISTS tsg_galaxy.session_record_log AS tsg_galaxy.session_record_log_local ENGINE =Distributed(ck_cluster,tsg_galaxy,session_record_log_local,rand()); -create TABLE IF NOT EXISTS ntc_galaxy.radius_log AS ntc_galaxy.radius_log_local ENGINE =Distributed(tsg_galaxy,ntc_galaxy,radius_log_local,rand()); -create TABLE IF NOT EXISTS ntc_galaxy.policy_event_log AS ntc_galaxy.policy_event_log_local ENGINE =Distributed(tsg_galaxy,ntc_galaxy,policy_event_log_local,rand()); -create TABLE IF NOT EXISTS ntc_galaxy.session_record_log AS ntc_galaxy.session_record_log_local ENGINE =Distributed(tsg_galaxy,ntc_galaxy,session_record_log_local,rand()); +create TABLE IF NOT EXISTS ntc_galaxy.radius_log AS ntc_galaxy.radius_log_local ENGINE =Distributed(ck_cluster,ntc_galaxy,radius_log_local,rand()); +create TABLE IF NOT EXISTS ntc_galaxy.policy_event_log AS ntc_galaxy.policy_event_log_local ENGINE =Distributed(ck_cluster,ntc_galaxy,policy_event_log_local,rand()); +create TABLE IF NOT EXISTS ntc_galaxy.session_record_log AS ntc_galaxy.session_record_log_local ENGINE =Distributed(ck_cluster,ntc_galaxy,session_record_log_local,rand()); diff --git a/TSG/home.md b/TSG/home.md index 41e0849..32e6c5d 100644 --- a/TSG/home.md +++ b/TSG/home.md @@ -33,8 +33,8 @@ Galaxy TSG 集成文档 1. 登录clickhouse连接终端 dbeave 建库 - create database tsg_galaxy on cluster tsg_galaxy ; - create database ntc_galaxy on cluster tsg_galaxy ; + create database tsg_galaxy on cluster ck_cluster; + create database ntc_galaxy on cluster ck_cluster; 2. 终端工具下执行如下语句 |
