hive SQL优化之distribute by和sort by
来源:互联网 发布:ai 人工智能 编辑:程序博客网 时间:2024/06/05 10:31
- INSERT OVERWRITE TABLE t_wa_funnel_distinct_temp PARTITION (pt='${SRCTIME}')
- SELECT
- bussiness_id,
- cookie_id,
- session_id,
- funnel_id,
- group_first(funnel_name) funnel_name,
- step_id,
- group_first(step_name) step_name,
- group_first(log_type) log_type,
- group_first(url_pattern) url_pattern,
- group_first(url) url,
- group_first(refer) refer,
- group_first(log_time) log_time,
- group_first(is_new_visitor) is_new_visitor,
- group_first(is_mobile_traffic) is_mobile_traffic,
- group_first(is_bounce) is_bounce,
- group_first(campaign_name) campaign_name,
- group_first(group_name) group_name,
- group_first(slot_name) slot_name,
- group_first(source_type) source_type,
- group_first(next_page) next_page,
- group_first(continent) continent,
- group_first(sub_continent_region) sub_continent_region,
- group_first(country) country,
- group_first(region) region,
- group_first(city) city,
- group_first(language) language,
- group_first(browser) browser,
- group_first(os) os,
- group_first(screen_color) screen_color,
- group_first(screen_resolution) screen_resolution,
- group_first(flash_version) flash_version,
- group_first(java) java,
- group_first(host) host
- FROM
- ( SELECT *
- FROM r_wa_funnel
- WHERE pt='${SRCTIME}'
- ORDER BY bussiness_id, cookie_id, session_id, funnel_id, step_id, log_time ASC
- ) t1
- GROUP BY pt, bussiness_id, cookie_id, session_id, funnel_id, step_id;
- INSERT OVERWRITE TABLE t_wa_funnel_distinct PARTITION (pt='2011.11.01.21')
- SELECT
- bussiness_id,
- cookie_id,
- session_id,
- funnel_id,
- group_first(funnel_name) funnel_name,
- step_id,
- group_first(step_name) step_name,
- group_first(log_type) log_type,
- group_first(url_pattern) url_pattern,
- group_first(url) url,
- group_first(refer) refer,
- group_first(log_time) log_time,
- group_first(is_new_visitor) is_new_visitor,
- group_first(is_mobile_traffic) is_mobile_traffic,
- group_first(is_bounce) is_bounce,
- group_first(campaign_name) campaign_name,
- group_first(group_name) group_name,
- group_first(slot_name) slot_name,
- group_first(source_type) source_type,
- group_first(next_page) next_page,
- group_first(continent) continent,
- group_first(sub_continent_region) sub_continent_region,
- group_first(country) country,
- group_first(region) region,
- group_first(city) city,
- group_first(language) language,
- group_first(browser) browser,
- group_first(os) os,
- group_first(screen_color) screen_color,
- group_first(screen_resolution) screen_resolution,
- group_first(flash_version) flash_version,
- group_first(java) java,
- group_first(host) host
- FROM
- ( SELECT *
- FROM r_wa_funnel
- WHERE pt='2011.11.01.21'
- distribute by bussiness_id, cookie_id, session_id, funnel_id, step_id sort by log_time ASC
- ) t1
- GROUP BY bussiness_id, cookie_id, session_id, funnel_id, step_id;
0 0
- hive SQL优化之distribute by和sort by
- hive SQL优化之distribute by和sort by
- hive SQL优化之distribute by和sort by
- hive SQL优化之distribute by和sort by
- hive SQL优化之distribute by和sort by
- hive SQL优化之distribute by和sort by .
- hive SQL优化之distribute by和sort by
- Hive优化----distribute by和sort by
- hive中order by 和sort by与distribute by
- hive中order by、distribute by、sort by和cluster by的区别和联系
- hive Sort By/Order By/Cluster By/Distribute By
- hive中的order by+sort by+distribute by+cluster by
- Hive Sort by/Order By/Cluster By/Distribute By
- hive sort by,order by ,distribute by,cluster by
- Hive order by/sort by/distribute by/cluster by作用
- hive中的order by , sort by, distribute by, cluster by
- Hive中order by,sort by,distribute by,cluster by
- hive中order by,distribute by,sort by,cluster by
- Android实现上下滑动效果
- 交换机和路由器的区别
- 企业关注技能知识点【Spring框架】
- oracle多表连接的三种方式
- 爬虫资料收集
- hive SQL优化之distribute by和sort by
- 求素数
- 机器不会有错的
- 找工作-基本查找排序算法总结
- libcurl在嵌入式设备C 的使用
- 笔记本重装系统后黑屏,但可以听到进入系统的声音
- JavaScript里的依赖注入
- js 绘制的rose
- Android读取图片资源的4中方式