Presto: Hive connector - DROP TABLE does not work

Created on 6 Nov 2015  路  3Comments  路  Source: prestodb/presto

I was able to create a table in Hive but not able to delete it:

[hadoop@ip-10-93-197-190 ~]$ presto-cli --catalog hive --schema default
presto:default> show tables;
   Table   
-----------
 emp       
 sample_07 
 sample_08 
(3 rows)

Query 20151106_223336_00007_vpcx5, FINISHED, 2 nodes
Splits: 2 total, 2 done (100.00%)
0:00 [3 rows, 80B] [38 rows/s, 1023B/s]

presto:default> create table person(firstname varchar, lastname varchar);
CREATE TABLE
presto:default> show tables;
   Table   
-----------
 emp       
 person    
 sample_07 
 sample_08 
(4 rows)

Query 20151106_223415_00009_vpcx5, FINISHED, 2 nodes
Splits: 2 total, 2 done (100.00%)
0:00 [4 rows, 103B] [87 rows/s, 2.21KB/s]

presto:default> drop table person;
Query 20151106_223422_00010_vpcx5 failed: Access Denied: Cannot drop table default.person

presto:default> 

Most helpful comment

The default security settings for hive don鈥檛 allow you do drop tables. Set this config in the hive catalog file to enable drop table hive.allow-drop-table=true

All 3 comments

The default security settings for hive don鈥檛 allow you do drop tables. Set this config in the hive catalog file to enable drop table hive.allow-drop-table=true

Thanks @dain that worked.

The default security settings for hive don鈥檛 allow you do drop tables. Set this config in the hive catalog file to enable drop table hive.allow-drop-table=true

Your solution works fine for 'default' schema. But it's unable to drop table from other than 'default' schema.

Was this page helpful?
0 / 5 - 0 ratings