Reply
Highlighted
JOL
New Contributor
Posts: 1
Registered: ‎11-02-2016
Accepted Solution

User oraggs_cdhdev1 does not have privileges for CREATETABLE

Hi all,

 

I am trying to create an external table in hive:

 

CREATE external TABLE emp(tran_flag string, tab_name string,tran_time_utc timestamp, tran_time_loc string,something string,EMPNO INT, ENAME string,JOB string,MGR INT,HIREDATE string,SAL INT,COMM INT,DEPTNO INT)ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' stored as textfile location '/user/oraggs_cdhdev1/d551/bdtest.emp';

 

getting error:

 

User oraggs_cdhdev1 does not have privileges for CREATETABLE
The required privileges: Server=server1->URI=hdfs://hostname/user/oraggs_cdhdev1/d551/bdtest.emp->action=*;), Query: CREATE external TABLE emp(tran_flag string, tab_name string,tran_time_utc timestamp, tran_time_loc string,something string,EMPNO INT, ENAME string,JOB string,MGR INT,HIREDATE string,SAL INT,COMM INT,DEPTNO INT)ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' stored as textfile location '/user/oraggs_cdhdev1/d551/bdtest.emp'. (state=HY000,code=500051)

 

+----------------------------+--------+------------+---------+------------------+-----------------+------------+---------------+-------------------+----------+--+
| database | table | partition | column | principal_name | principal_type | privilege | grant_option | grant_time | grantor |
+----------------------------+--------+------------+---------+------------------+-----------------+------------+---------------+-------------------+----------+--+
| ggpoc | | | | goldengate_role | ROLE | * | 0 | 1476476669810000 | -- |
| default | | | | goldengate_role | ROLE | select | 0 | 1459868647133000 | -- |
| /user/oraggs_cdhdev1/d551 | | | | goldengate_role | ROLE | * | 0 | 1478092671457000 | -- |
+----------------------------+--------+------------+---------+------------------+-----------------+------------+---------------+-------------------+----------+--+

 

what else privileges needs to be given

Cloudera Employee
Posts: 15
Registered: ‎12-11-2015

Re: User oraggs_cdhdev1 does not have privileges for CREATETABLE

Hi JOL,

The user needs write permissions on the HDFS directory to be able to create the table.
Announcements