美文网首页
[log]2023-09-27 插入分区表partition(d

[log]2023-09-27 插入分区表partition(d

作者: 麒麟楚庄王 | 来源:发表于2023-09-26 15:10 被阅读0次

    采用动态分区

    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;

    相关文章

      网友评论

          本文标题:[log]2023-09-27 插入分区表partition(d

          本文链接:https://www.haomeiwen.com/subject/oqdhbdtx.html