[Resolved]FAILED: SemanticException Unable to fetch table Table_Name. java.security.AccessControlException

In this article, we will provide simple resolution for the “This request is not authorized to perform this operation using this permission.”, 403, HEAD issue.



Error:

getting following error when running select query on any table belonging to DB_Name SQL Error [40000] [42000]: Error while compiling statement: FAILED: SemanticException Unable to fetch table Table_Name. java.security.AccessControlException: Operation failed: “This request is not authorized to perform this operation using this permission.”, 403, HEAD,

When I tried to run the simple select query getting the above error.

Solution :

1. First, we need to check whether DB exist or not. How to check that?

Logged in edge nodeĀ  then go to the Beeline prompt then describe the database.

2. If yes, then check count for that table. After that please follow the below step




3. Check user group access with below command:

groups userid

If user belongs to particular group for the particular Db then no need other wise we need to add Ranger policy like below step.

4. Go to Ranger Admin web – ui then create policy for this Hive Database then provide DB and table access for that particular user id.

5. After sometime need to check with particular user. Simply this error belongs to unauthorized for the particular.

DB Access provide from Azure Blob Storage:

1. Go to Production blob container and then give respective container path.

2. Right click on DB folder then will get ” Manage Access Control Lists”.

3. Check Default users, then will click on “Read”, “Write”, and “Execute” access.

4. After some time user will get the full access on the Data base. Then simply able to access for the particular users.




The above steps are very simple to provide DB access for particular user. These type of issues quite common in the Big Data or Azure clusters for Developers. As compared to Ranger Admin policies, Azure Blob Storage very simple to provide access to new user or existing users.

Leave a Reply

Your email address will not be published.