Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

User oraggs_cdhdev1 does not have privileges for CREATETABLE

avatar
Reader

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

1 ACCEPTED SOLUTION

avatar
Contributor
Hi JOL,

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

View solution in original post

1 REPLY 1

avatar
Contributor
Hi JOL,

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