采用动态分区
insert overwrite table lao.lk_opr_ar_model_monitor_xbsp_auditcode_log_pt partition(dt)
Select tmp.riskcode,count(1) cnt,a.dt
FROM (select dt,user_id,`value`
from xuan.fact_user_model_variable
where tag = 'ar_xb_auditreasonid_dedup'
and dt = CURRENT_DATE()
) a
lateral view explode(split(`value`,',')) tmp as riskcode
group by a.dt,tmp.riskcode;
网友评论