File size: 1,344 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
---
id: offline-compute_HiveSQL_hivesql_020
name:  internal_platform_db.t_boss_v1_dict_item_hour_query_engine_130 筛选
category: offline-compute/HiveSQL
timeout_seconds: 600
modality: pure-text
engine: hivesql
---
## Prompt
任务目标:对指定分区的字典项小时表进行记录数监控统计,输出监控结果到目标表分区。

输入:
- internal_platform_db.t_boss_v1_dict_item_hour_query_engine_130

处理规则:
1. 无 Join,单表处理
2. 过滤条件:imp_hour=2026060910
3. 分组聚合:按 dim_name='AEGIS_ALL' 和 dim_value='AEGIS_ALL' 分组
4. 聚合计算:count(1) 得到 compute_item_51323
5. 派生列:
   - imp_time = 2026060910
   - data_type = 'monitor'
   - data_id = '1::dept_om::t_boss_v1_dict_item_hour_query_engine_130'
   - check_rule_id = 51322
   - check_item_id = 51323
   - compute_value = compute_item_51323
   - compare_value = null
   - check_value = compute_item_51323

输出要求:
- 输出字段顺序:imp_time, data_type, data_id, check_rule_id, check_item_id, dim_name, dim_value, compute_value, compare_value, check_value

写入要求:
- 目标表:internal_platform_db.t_boss_v1_dict_item_hour_monitor_res_cand_query_engine_130
- 写入方式:insert overwrite
- 分区:partition (p_2026060910, p_monitor)

请将最终 HiveSQL 写入 result.sql 并执行。