And when I print the tables I can see the tables I have created, the problem is when I run
cursor.execute('SELECT * FROM my_table LIMIT 100')
I encounter the error:
HiveServer2Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=my_user, type=USER] does not have following privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, name=my_table]]
Which is very strange since I can access the tables outside python. What am I doing wrong?
I have look at the hive config and I have found the following, so it seems that I am using the right authentication mechanism.
I am using impyla to connecto to Hive. I have set the following:
from impala.dbapi import connect conn = connect(host='atgrzsl2654.avl01.avlcorp.lan', port=10000, user='my_user', auth_mechanism="PLAIN", database='my_database') cursor = conn.cursor() cursor.execute('SHOW TABLES')
And when I print the tables I can see the tables I have created, the problem is when I run
cursor.execute('SELECT * FROM my_table LIMIT 100')
I encounter the error:
HiveServer2Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=my_user, type=USER] does not have following privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, name=my_table]]
Which is very strange since I can access the tables outside python. What am I doing wrong?
I have look at the hive config and I have found the following, so it seems that I am using the right authentication mechanism.