Hive删库

drop database tpch_textfile;

报错如下:

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. InvalidOperationException(message:Database tpch_textfile is not empty. One or more tables exist.)

Hive不能删除含有表的数据库,要先将数据库中的表清空才能删。加cascade可强制删除。

drop database tpch_textfile cascade;

完。


版权声明:本文为zhangs_123原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。