Datasets:
File size: 7,686 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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | CREATE DATABASE IF NOT EXISTS internal_platform_db;
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_group_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_group_di_query_engine_142
VALUES
(20260608, 'app001', 'msg_g1', 'puin001', '1', 'grp001', 'scene_group', 'sub_group1', 'hit1', '1', '3', '{"key":"val1"}', 20250101),
(20260608, 'app002', 'msg_g2', 'puin002', '0', 'grp002', 'scene_group', 'sub_group2', '', '0', '7', '{"key":"val2"}', 20240601);
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_pd_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间',
`strategy_id` STRING COMMENT '策略id',
`strategy_status` STRING COMMENT '策略状态'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_pd_di_query_engine_142
VALUES
(20260608, 'app003', 'msg_pd1', 'puin003', '1', 'grp003', 'scene_pd', 'sub_pd1', 'hit3', '1', '5', '{"key":"val3"}', 20230901, 'strat01', 'active'),
(20260608, 'app004', 'msg_pd2', 'puin004', '0', 'grp004', 'scene_pd', 'sub_pd2', '', '0', '10', '{"key":"val4"}', 20231201, 'strat02', 'inactive');
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_social_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_social_di_query_engine_142
VALUES
(20260608, 'app005', 'msg_qz1', 'puin005', '1', 'grp005', 'scene_socialzone', 'sub_qz1', 'hit5', '1', '2', '{"key":"val5"}', 20250301);
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_social_scene_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_social_scene_di_query_engine_142
VALUES
(20260608, 'app006', 'msg_jb1', 'puin006', '0', 'grp006', 'scene_social_scene', 'sub_jb1', '', '0', '15', '{"key":"val6"}', 20220601);
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_profile_page_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_profile_page_di_query_engine_142
VALUES
(20260608, 'app007', 'msg_zl1', 'puin007', '1', 'grp007', 'scene_profile_page', 'sub_zl1', 'hit7', '1', '1', '{"key":"val7"}', 20250601);
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_group_profile_di_query_engine_142 (
`imp_date` BIGINT COMMENT '日期',
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) STORED AS ORC;
INSERT INTO TABLE internal_platform_db.dwd_im_ads_businesses_core_scene_detail_group_profile_di_query_engine_142
VALUES
(20260608, 'app008', 'msg_gp1', 'puin008', '0', 'grp008', 'scene_gprofile', 'sub_gp1', '', '0', '20', '{"key":"val8"}', 20210301);
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_di_query_engine_142 (
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) PARTITIONED BY (`imp_date` BIGINT) STORED AS ORC;
-- Agent 候选目标表
CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_im_ads_businesses_core_scene_detail_di_cand_query_engine_142 (
`appid` STRING COMMENT 'appid',
`message_id` STRING COMMENT '消息id',
`puin` STRING COMMENT 'puin',
`code` STRING COMMENT '是否打击',
`group_no` STRING COMMENT '群号',
`scene` STRING COMMENT '业务',
`sub_scene` STRING COMMENT '场景',
`hit_msg` STRING COMMENT '打击消息id(频道)',
`is_punish_beat` STRING COMMENT '是否打击(频道)',
`new_reg_tag` STRING COMMENT '新注册天数',
`payload_req` STRING COMMENT '请求体',
`reg_date` BIGINT COMMENT '注册时间'
) PARTITIONED BY (`imp_date` BIGINT) STORED AS ORC; |