我在test
的HIVE
数据库中有一些表,这些表是由另一个用户创建的。
我正在尝试将这些表移动到另一个名为events
的数据库中
我已经尝试过如下
alter table test.123 rename to events.123
但是我收到
permission denied
错误,因为表123
已由另一个创建。1) How can I move this table?
2) How can we change the owner of the table to other user's?
3) Or How can we change ownership of all tables of a database to another user?
4) What is the best scenario where we don't need to worry about permission on Hive tables?
最佳答案
您可以尝试以 super 用户关注
ALTER (DATABASE|SCHEMA) database_name SET OWNER [USER|ROLE] user_or_role; -- (Note: Hive 0.13.0 and later; SCHEMA added in Hive 0.14.0)
如果您的Hadoop群集已启用Kerberos,则无法使用非 super 用户帐户更改所有权。如果这是可能的,则不使用权限。
关于hadoop - 如何更改配置单元表/数据库的所有权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44448675/