Hive 配置单元创建表语义异常0:0

Hive 配置单元创建表语义异常0:0,hive,hql,Hive,Hql,大家好: 我是hive的新手,我在使用“选择自”语法创建表时遇到了这个错误, 我的输入如下: `hive>create table longyuan_web.tmp_recent_week_data_cookies as select u from longyuan_web.ods_mbw_user_pv where dt>='2018-07-19' and dt<='2018-07-25'and platform='31' and u is not null a

大家好:
我是hive的新手,我在使用“选择自”语法创建表时遇到了这个错误,
我的输入如下:

`hive>create table longyuan_web.tmp_recent_week_data_cookies as 
 select u from longyuan_web.ods_mbw_user_pv where dt>='2018-07-19' 
 and dt<='2018-07-25'and  platform='31' 
 and u is not null and length(u)>=32
 and os='ios' group by u`
`hive>创建表longyuan\u web.tmp\u最近一周\u数据\u cookies作为
从龙源web.ods_mbw_user_pv中选择u,其中dt>='2018-07-19'
dt=32
和美国的os='ios'组`
我收到这个错误:
失败:SemanticException 0:0在上创建临时文件夹时出错:hdfs://hadoop-bd-ns01/hive/warehouse/longyuan_web.db. 在标记“TOK_TMP_文件”附近遇到错误

我非常确定我在正确的集群上,并且原始表也在这个集群上
这个“TOK\u TMP\u文件”是什么?

非常感谢您

主要问题是用户没有权限写入龙源网数据库

请检查您是否拥有正确的权限,然后尝试执行CTA,然后再次执行CTA

吉拉的罚单上也提到了同样的问题

没错

(我假设您的select查询可以独立运行)

您已在龙源大学web数据库中读取访问权限。但不是写访问

解决方法是。。。 尝试在其他具有写访问权限的数据库中创建表,如

 `hive>create table **xxx_web**.tmp_recent_week_data_cookies as select u from longyuan_web.ods_mbw_user_pv where dt>='2018-07-19' and dt<='2018-07-25'and platform='31' and u is not null and length(u)>=32 and os='ios' group by u` as select u from longyuan_web.ods_mbw_user_pv where dt>='2018-07-19' and dt<='2018-07-25'and platform='31' and u is not null and length(u)>=32 and os='ios' group by u`
`hive>创建表**xxx\u web**.tmp\u最近一周的数据\u cookies作为从龙源web.ods\u mbw\u user\u pv中选择u,其中dt>='2018-07-19'和dt=32,以及os='ios'组由u'作为从龙源web.ods\u mbw\u user\u pv中选择u,其中dt>='2018-07-19'和dt=32,以及os='ios'组由u'选择u`

其中xxx_web是您具有写访问权限的数据库。

非常感谢,您是对的,我在另一个数据库中创建了临时表,它可以正常工作