- 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 find out the roles / groups assigned to a schema / DB in Hive
- Labels:
-
Apache Hive
-
Apache Sentry
Created ‎02-10-2023 06:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I want to find out what are the roles / groups assigned to a DB / Schema in Hive, how I can get those details ? please suggest.
Thank you.
Regards,
PK
Created ‎02-17-2023 10:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PK,
If you have access to the Sentry Store backend use a query like this:
SELECT
r.ROLE_NAME,
g.GROUP_NAME,
p.*,
FROM_UNIXTIME(p.CREATE_TIME / 1000) as CREATE_TIME_DATE
FROM
SENTRY_ROLE r
INNER JOIN SENTRY_ROLE_GROUP_MAP rgm ON r.ROLE_ID = rgm.ROLE_ID
INNER JOIN SENTRY_GROUP g ON g.GROUP_ID = rgm.GROUP_ID
INNER JOIN SENTRY_ROLE_DB_PRIVILEGE_MAP rpm ON r.ROLE_ID = rpm.ROLE_ID
INNER JOIN SENTRY_DB_PRIVILEGE p ON p.DB_PRIVILEGE_ID = rpm.DB_PRIVILEGE_ID;
Hope it helps,
-JMP
Created ‎01-22-2025 12:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested this in 7.1.9 SP1 CHF 4, with Postgres

- « Previous
-
- 1
- 2
- Next »