File size: 2,446 Bytes
e8c001c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
CREATE DATABASE IF NOT EXISTS internal_platform_db;

-- Input table
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_t_event_log_v1_05900072467_with_subpartition_hi_prestosql_003 (
  databus_imp_date STRING,
  ftime STRING,
  appid STRING,
  message_id STRING,
  reqbody STRING,
  content STRING,
  model_id STRING,
  group_num STRING,
  punish_path_name STRING,
  ext_field1 STRING,
  ext_field2 STRING,
  ds BIGINT
) STORED AS ORC;

INSERT INTO TABLE internal_platform_db.dwd_t_event_log_v1_05900072467_with_subpartition_hi_prestosql_003 VALUES
('20260609', '20250324', '100553', 'msg001', '{"tag_info":{"tag_result_text":"诈骗-网络赌博","tag_id":"t1"},"detail":"detail1"}', 'content1', 'model_a', 'group001', '处罚1', '', '', 20260609),
('20260609', '20250324', '100553', 'msg002', '{"tag_info":{"tag_result_text":"诈骗-电信诈骗","tag_id":"t2"},"detail":"detail2"}', 'content2', 'model_b', 'group002', '处罚2', '', '', 20260609),
('20260609', '20250324', '100553', 'msg003', '{"tag_info":{"tag_result_text":"诈骗-投资理财","tag_id":"t3"},"detail":"detail3"}', 'content3', 'model_c', 'group003', '处罚3', '', '', 20260609),
('20260609', '20250324', '100553', 'msg004', '{"tag_info":{"tag_result_text":"正常-安全","tag_id":"t4"},"detail":"detail4"}', 'content4', 'model_d', 'group004', '', '', '', 20260609),
('20260609', '20250324', '100553', 'msg005', NULL, 'content5', 'model_e', 'group005', '', '', '', 20260609),
('20260609', '20250325', '100553', 'msg006', '{"tag_info":{"tag_result_text":"诈骗-冒充客服","tag_id":"t5"},"detail":"detail6"}', 'content6', 'model_f', 'group006', '处罚4', '', '', 20260609),
('20260609', '20250324', '200553', 'msg007', '{"tag_info":{"tag_result_text":"诈骗-网络赌博","tag_id":"t6"},"detail":"detail7"}', 'content7', 'model_g', 'group007', '处罚5', '', '', 20260609);

-- GT output table
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_qqgroup_offline_report_prestosql_003 (
  ftime STRING,
  appid STRING,
  model_id STRING,
  message_id STRING,
  databus_imp_date STRING,
  group_num STRING,
  punish_path_name STRING,
  content STRING
) STORED AS ORC;

-- Candidate output table
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_qqgroup_offline_report_cand_prestosql_003 (
  ftime STRING,
  appid STRING,
  model_id STRING,
  message_id STRING,
  databus_imp_date STRING,
  group_num STRING,
  punish_path_name STRING,
  content STRING
) STORED AS ORC;