Reputation: 9
HI, all :
i am newbie at hive, i got this error when i was creating a table using "select from " syntax,
my input is as following:
`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`
i get this error:
FAILED: SemanticException 0:0 Error creating temporary folder on: hdfs://hadoop-bd-ns01/hive/warehouse/longyuan_web.db. Error encountered near token 'TOK_TMP_FILE
'
i am pretty sure i am on the right cluster and the original table is also on this cluster
what this 'TOK_TMP_FILE'?
thank you so much!!
Upvotes: 0
Views: 5959
Reputation: 1588
That's right.
(I assume Your select query runs good as stand-alone)
You have read access in longyuan_web db. But not write access.
Work around is... Try to create the table in some other db where you have write access, like....
`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`
Where xxx_web is the Db where you have write access.
Upvotes: 0