After I tried to load data from a file in HDFS into Hive, I ran into a permission error as show below. Could you please help to let me know what I did wrong?
1) I uploaded a csv file: EMP.csv from my laptop into HDFS folder: /user/admin using admin credential.
2) I use Data Analytic studio to load the csv file into an external table in Hive using the code below:
CREATE EXTERNAL TABLE IF NOT EXISTS emp(
COMMENT 'My first Hive table'
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
Here is the error:
"org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [hive] does not have [ALL] privilege on [hdfs://sandbox-hdp.hortonworks.com:8020/user/admin/EMP.csv]"
Thanks for replying my question. After I have tried the solution, I ran into another security issue as show in the screen shot.
I have tried the HDP_2.6.5. Everything works just fine and the Ambari user interface is more easier to use.
@TDStephanieSoft If you are using Ranger kindly check if you have necessary permission for hive user in the HDFS policy for the path '/user/admin/EMP.csv'. Also check whether the hive use has read, write and execute permission in the HDFS location '/user/admin/EMP.csv'
After I have checked the permission in Ranger, I noticed that there isn't any policy setup for hive user. I did add a policy to allow access to the folder /user/admin in HDFS to hive user. The problem is I cannot save the new policy due to another security error as show below.
I wonder if the Hortonworks Sandbox HDP 3.0 that I downloaded is working version 😞