- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to set select permission for a table in specified database for sentry policy in Hive?
- Labels:
-
Apache Hive
-
Apache Sentry
Created on ‎08-28-2014 03:16 PM - edited ‎09-16-2022 02:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To set up policy for sentry service, I saw that there is an example of set select permission for a database on cloudera doc:
GRANT SELECT ON DATABASE jranalyst1 TO ROLE analyst_role;
How can I set the select permission on table A in Database B to Role C ? Thanks!
Created on ‎08-28-2014 03:25 PM - edited ‎08-28-2014 03:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can switch to the database and grant privileges on the table.
USE jranalyst;
GRANT SELECT ON TABLE a TO ROLE c;
Hive currently doesnt support fully qualified table names (db1.tb1) in grant/revoke sql, and that is the reason you will need to switch to the database first to be able to grant privileges on a table.
Created on ‎08-28-2014 03:25 PM - edited ‎08-28-2014 03:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can switch to the database and grant privileges on the table.
USE jranalyst;
GRANT SELECT ON TABLE a TO ROLE c;
Hive currently doesnt support fully qualified table names (db1.tb1) in grant/revoke sql, and that is the reason you will need to switch to the database first to be able to grant privileges on a table.
