zoukankan      html  css  js  c++  java
  • hive多分区写入

    hive多分区写入

    -- 多分区写入
    set mapred.max.split.size=256000000;
    set hive.exec.dynamic.partition.mode=nonstrict;
    set hive.exec.max.dynamic.partitions=800;
    set hive.exec.max.dynamic.partitions.pernode=800;
    
    INSERT overwrite table ods.im_session_content_record partition(`date`)
    select
    -999 as source_type,
    a.cid,
    a.sid,
    a.vccid,
    a.userid,
    current_timestamp as bi_update_datetime,
    to_date(from_unixtime(cast(cont.createTime as int))) as `date`
    from ods.im_session_content a LATERAL VIEW explode(content) bb AS cont
    where from_unixtime(cast(cont.createTime as int)) < '2018-11-25'
    ;
    
    INSERT overwrite table ods.im_session_content_record partition(`date`)
    select
    -999 as source_type,
    a.cid,
    a.sid,
    a.vccid,
    a.userid,
    current_timestamp as bi_update_datetime,
    to_date(from_unixtime(cast(cont.createTime as int))) as `date`
    from ods.im_session_content a LATERAL VIEW explode(content) bb AS cont
    where from_unixtime(cast(cont.createTime as int)) >= '2018-11-25'
    and from_unixtime(cast(cont.createTime as int)) < '2018-12-02'
    ;
    
  • 相关阅读:
    第九章 读书笔记
    第八章 读书笔记
    第七章 读书笔记
    第六章 读书笔记
    第五章 读书笔记
    第四章读书笔记
    第三章读书笔记
    第九章 硬件抽象层:HAL
    第10章 嵌入式linux的调试技术
    第八章 蜂鸣器驱动
  • 原文地址:https://www.cnblogs.com/myblog1900/p/11539989.html
Copyright © 2011-2022 走看看