From 56fc5401ac106850114e54f26dd266e7e1e823b4 Mon Sep 17 00:00:00 2001 From: lifengchao Date: Thu, 22 Aug 2024 10:39:16 +0800 Subject: [PATCH] =?UTF-8?q?TSG-22310=20clickhouse=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=A1=A8SIP=E5=8D=8F=E8=AE=AE=E6=96=B0=E5=A2=9Esip=5Fbye=5Frea?= =?UTF-8?q?son=E5=AD=97=E6=AE=B5=20(24-02.1=E7=89=88=E6=9C=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tsg_olap_clickhouse_ddl_24.02.1.sql | 25 ++++++++++++++++--- .../tsg_olap_clickhouse_ddl_check_24.02.1.sql | 10 ++++---- ...sg_olap_clickhouse_ddl_upgrade_24.02.1.sql | 25 +++++++++++++++++++ 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_24.02.1.sql b/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_24.02.1.sql index 671b67e..db61b81 100644 --- a/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_24.02.1.sql +++ b/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_24.02.1.sql @@ -308,6 +308,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -542,6 +543,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -774,6 +776,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -1005,6 +1008,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -1238,6 +1242,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -1469,6 +1474,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -1701,6 +1707,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -1934,6 +1941,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -2165,6 +2173,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -2290,7 +2299,8 @@ sip_responder_sdp_media_port Nullable(Int32), sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), -sip_bye String +sip_bye String, +sip_bye_reason String ) ENGINE = MergeTree PARTITION BY toYYYYMMDD(toDate(recv_time)) @@ -2384,7 +2394,8 @@ sip_responder_sdp_media_port Nullable(Int32), sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), -sip_bye String +sip_bye String, +sip_bye_reason String ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,transaction_record_local,rand()); @@ -2476,7 +2487,8 @@ sip_responder_sdp_media_port Nullable(Int32), sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), -sip_bye String +sip_bye String, +sip_bye_reason String ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,transaction_record_local,rand()); @@ -2571,6 +2583,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -2692,6 +2705,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -2811,6 +2825,7 @@ sip_responder_sdp_media_type String, sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, +sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -3497,6 +3512,7 @@ TO tsg_galaxy_v3.security_event_local sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, + sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -3727,6 +3743,7 @@ SELECT sip_responder_sdp_content, sip_duration_s, sip_bye, + sip_bye_reason, rtp_payload_type_c2s, rtp_payload_type_s2c, rtp_pcap_path, @@ -3962,6 +3979,7 @@ TO tsg_galaxy_v3.monitor_event_local sip_responder_sdp_content String, sip_duration_s Nullable(Int32), sip_bye String, + sip_bye_reason String, rtp_payload_type_c2s Nullable(Int32), rtp_payload_type_s2c Nullable(Int32), rtp_pcap_path String, @@ -4192,6 +4210,7 @@ SELECT sip_responder_sdp_content, sip_duration_s, sip_bye, + sip_bye_reason, rtp_payload_type_c2s, rtp_payload_type_s2c, rtp_pcap_path, diff --git a/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_check_24.02.1.sql b/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_check_24.02.1.sql index 73fbce1..98b09cb 100644 --- a/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_check_24.02.1.sql +++ b/tsg_olap/upgrade/TSG-24.02.1/clickhouse/tsg_olap_clickhouse_ddl_check_24.02.1.sql @@ -2,17 +2,17 @@ SELECT log_id, recv_time, vsys_id, assessment_date, lot_number, file_name, asses FROM tsg_galaxy_v3.assessment_event where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time = toUnixTimestamp('2030-01-01 00:00:00') AND recv_time