• hive的UDF函数和UDTF函数还是挺难的(´・㉨・`)


    insertoverwritetabledwd_base_event_log

    PARTITION(dt='2019-02-10')

    select

    mid_id,

    user_id,

    version_code,

    version_name,

    lang,

    source,

    os,

    area,

    model,

    brand,

    sdk_version,

    gmail,

    height_width,

    app_time,

    network,

    lng,

    lat,

    event_name,

    event_json,

    server_time

    from

    (

    select

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[0]

    asmid_id,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[1]

    asuser_id,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[2]

    asversion_code,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[3]

    asversion_name,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[4]

    aslang,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[5]

    assource,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[6]

    asos,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[7]

    asarea,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[8]

    asmodel,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[9]

    asbrand,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[10]

    assdk_version,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[11]

    asgmail,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[12]

    asheight_width,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[13]

    asapp_time,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[14]

    asnetwork,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[15]

    aslng,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[16]

    aslat,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[17]

    asops,

    split(base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la'),'\t')[18]

    asserver_time

    fromods_event_logwheredt='2019-02-10'and

    base_analizer(line,'mid,uid,vc,vn,l,sr,os,ar,md,ba,sv,g,hw,t,nw,ln,la')<>''

    )sdk_loglateralviewflat_analizer(ops)tmp_kasevent_name,event_json;

  • 相关阅读:
    创建web应用程序时出现 SharePoint HRESULT:0x80070094 问题
    用Javascript获取SharePoint当前登录用户的用户名及Group信息
    javascript连接数据库
    sharepoint 中banner 图片的放大
    GridView导出Excel 类库
    SQL Server 性能调优
    GridView长字段的显示
    MOSS母版页制作学习笔记(二)
    sharepoint 中批量导入导出
    JavaScript 动态更改sharepoint 列表的颜色
  • 原文地址:https://www.cnblogs.com/ajinjinjin/p/15911622.html
Copyright © 2020-2023  润新知