python 2.7 - HiveAccessControlException Permission denied. [On pyhs2] -
i trying access data through pyhs2 writing select query.
import pyhs2 pyhs2.connect(host='localhost', port=10000, authmechanism="plain", user='hue', password='', database='default') conn: conn.cursor() cur: print cur.getdatabases() cur.execute("select * orders") print cur.getschema() in cur.fetch(): print
this gives me error:
pyhs2.error.pyhs2exception: 'error while compiling statement: failed: hiveaccesscontrolexception permission denied. principal [name=hue, type=user] not have following privileges on object [type=table_or_view, name=default.orders] : [select]'
few available answers suggested using:
grant select on table orders user hue
this again gives me error:
yhs2.error.pyhs2exception: 'error while processing statement: failed: execution error, return code 1 org.apache.hadoop.hive.ql.exec.ddltask. permission denied. principal [name=hue, type=user] not have following privileges on object [type=table_or_view, name=default.orders] : [select grant]'
Comments
Post a Comment