Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin?

Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin?

New Contributor

- Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin on latest version of HDP?

3 REPLIES 3

Re: Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin?

New Contributor

DROP TABLE IF EXISTS tableName;

Re: Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin?

New Contributor

@sulanta thanks but my requirement is little different. What I want is to restrict the user from dropping the database but that user should be able to drop the table. Is this possible?

Re: Is it possible to DROP TABLE but not DROP DATABASE in Hive using Ranger Hive Plugin?

New Contributor

The above command does not drop the database , it will only drop the specific table mentioned in the command.

Don't have an account?
Coming from Hortonworks? Activate your account here