Hive UNION ALL 提示 Schema of both sides of union should match.
来源:互联网 发布:南京数据分析招聘 编辑:程序博客网 时间:2024/05/22 09:06
感谢分享:http://blog.csdn.net/jinjiating/article/details/18009503
select * from
(select tokenid
from sm_play where dt=140108
union all
select device_token
from mda_dbs_passport_device)tmp;
FAILED: SemanticException 6:5 Schema of both sides of union should match. tmp-subquery2 does not have the field tokenid. Error encountered near token 'mda_dbs_passport_device'
原因:union all两边表的列名不一致
select * from
(select tokenid
from sm_play where dt=140108
union all
select device_token as tokenid
from mda_dbs_passport_device)tmp;
我的语句:
CREATE VIEW IF NOT EXISTS xxx.xxx AS
SELECT
a.xxx AS aaa,
b.xxx AS bbb
FROM xxx a
LEFT JOIN xxx b
UNION ALLSELECT
NULL,
c.xxx
FROM xxx c
改成
CREATE VIEW IF NOT EXISTS xxx.xxx AS
SELECT
a.xxx AS aaa,
b.xxx AS bbb
FROM xxx a
LEFT JOIN xxx b
UNION ALLSELECT
NULL AS aaa,
c.xxx AS bbb
FROM xxx c
阅读全文
0 0
- Hive UNION ALL 提示 Schema of both sides of union should match.
- hive union (all)
- hive union all 使用
- hive union all 使用
- #hive#hive中的union all
- Hive union all报错
- union,union all 等
- union all 和union
- UNION,UNION ALL,MINUS
- union union all
- UNION and UNION All
- union 和 union all
- UNION与UNION ALL
- SQL Union / Union All
- UNION 和 UNION ALL
- union和union all
- union all和union
- union 、 union all
- CSS样式加载方式
- 数据结构实验之图论十一:AOE网上的关键路径
- 史上最全的maven pom.xml文件教程详解
- Oracle 启动监听命令
- linux进程间通信方式之定时器信号alarm
- Hive UNION ALL 提示 Schema of both sides of union should match.
- [Leetcode] 502. IPO 解题报告
- vue-cli起的webpack项目 用localhost可以访问,但是切换到ip就不可以访问
- winwdows server 2012R2 储存池重建
- 第十三周 【项目2
- JWT 跨域token 安全解决方案
- 生成范围在[a,b]之中的随机整数
- Spark快速大数据分析
- Java中常用的异常处理方法