Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hive load data from hdfs error: No files matching path hdfs

hive load data from hdfs error: No files matching path hdfs

Explorer

Hi , I am trying to load a table from hdfs to hive and I got an error:

hive> create external table employees (emp_id STRING, fname STRING, lname STRING, address STRING, city STRING, state STRING, zipcode STRING, job_title STRING, email STRING, active STring, salary INT) row format delimited fields terminated by '\t' location '/user/hive/warehouse';
OK
Time taken: 0.187 seconds
hive> load data inpath 'hdfs:/user/root/dualcore/employees' into table employees;
FAILED: SemanticException Line 1:18 Invalid path ''hdfs:/user/root/dualcore/employees'': No files matching path hdfs://Cloudera01.abc.com:8020/user/root/dualcore/employees

 

But I have this file in the directory

root@Cloudera01 ~]# hadoop fs -ls /user/root/dualcore
Found 5 items
drwxr-xr-x - root supergroup 0 2016-09-07 15:18 /user/root/dualcore/customers
drwxr-xr-x - root supergroup 0 2016-09-09 14:52 /user/root/dualcore/employees
drwxr-xr-x - root supergroup 0 2016-09-07 15:22 /user/root/dualcore/order_details
drwxr-xr-x - root supergroup 0 2016-09-07 15:21 /user/root/dualcore/orders
drwxr-xr-x - root supergroup 0 2016-09-07 15:18 /user/root/dualcore/products

 

I am running this hive command under the root acount, so I dont think this is a permission issue, and I have the table employees in the hdfs folder. I also tried the full path, it gave me the same error.

 

hive> load data inpath 'hdfs://Cloudera01.abc.com:8020/user/root/dualcore/employees' into table employees;

 

any help would be much appreciated.