Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

User oraggs_cdhdev1 does not have privileges for CREATETABLE

avatar
New Contributor

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.