hive lateral view explode 使用
来源:互联网 发布:排序算法对比 编辑:程序博客网 时间:2024/05/19 23:12
select
SUPER_SITE_ID,
split(tmp.cmapaign,',')[0] as SUPER_CMAPAIGN_ID ,
split(tmp.cmapaign,',')[2] as SUPER_POSITION
from (
select
SUPER_SITE_ID ,
cmapaign
from cjfImprLog lateral view explode(split(super_cmapaign,'\\;')) cmapaign1 ascmapaign
where yyyymmdd='${yyyymmdd}' and SUPER_TYPE =1 and super_cmapaign <> ''
SUPER_SITE_ID,
split(tmp.cmapaign,',')[0] as SUPER_CMAPAIGN_ID ,
split(tmp.cmapaign,',')[2] as SUPER_POSITION
from (
select
SUPER_SITE_ID ,
cmapaign
from cjfImprLog lateral view explode(split(super_cmapaign,'\\;')) cmapaign1 ascmapaign
where yyyymmdd='${yyyymmdd}' and SUPER_TYPE =1 and super_cmapaign <> ''
) tmp
红色部分必须要写,否则不会出现列转行的结果。
绿色部分要注意转义符号
0 0
- hive lateral view explode 使用
- hive:explode() 与 lateral view
- hive sql 中lateral view explode/json_tuple的使用
- Lateral View用法 与 Hive UDTF explode
- hive lateral view 与 explode详解
- hive lateral view 与 explode详解
- Lateral View用法 与 Hive UDTF explode
- hive行转列lateral view explode用法
- hive lateral view 与 explode详解
- Lateral View用法 与 Hive UDTF explode
- hive常用UDF and UDTF函数介绍-lateral view explode()
- hive collect_set,lateral view,explode 实现行列转换
- SQL 之 lateral view explode()
- 行转多列lateral view explode详解
- Hive行列转换-lateral view的使用
- Hive--行转列(Lateral View explode())和列转行(collect_set() 去重)
- Hive Lateral view介绍
- hive lateral view语句
- 博客已经 写了一万三千多字了... ...
- qt中采用宽带speex进行网络语音通话实验程序
- Ext.form.NumberField使用
- Mybatis的<where><foreach><set>等标签详解
- Python 模拟键盘输入
- hive lateral view explode 使用
- 关于静态变量,静态代码块,实例变量,实例代码块,构造函数的执行顺序
- java所有N位数之内的自幂数(3位数的自幂数也叫水仙花数)
- Foundation--NSUserDefaults
- freetds使用-远程访问SQL Server库
- Oracle分析函数
- Oracle监听
- JDEE CentOS server 智能提示
- CODEVS 1046 旅行家的预算