1、问题描述:

(1)问题示例:

hive (test)> create table t_textfile(c1 string,c2 int,c3 string,c4 string)
           > row format delimited fields terminated by '\t' stored as textfile;
OK
Time taken: 1.439 seconds
hive (test)> load data inpath '/home/grid/Tmp/data.csv' into table t_textfile;
FAILED: SemanticException Line 1:17 Invalid path ''/home/Hadoop/Tmp/data.csv'': No files matching path hdfs://master:9000/home/Hadoop/Tmp/data.csv
hive (test)> select * from t_textfile
           > ;
OK
c1    c2    c3    c4
Time taken: 3.038 seconds
hive (test)> load data inpath '/home/grid/Tmp/data.csv' into table t_textfile;
FAILED: SemanticException Line 1:17 Invalid path ''/home/grid/Tmp/data.csv'': No files matching path hdfs://master:9000/home/grid/Tmp/data.csv

(2)问题综述:

  • Hive创建textfile格式的表,从文件中载入数据不能成功。

2、问题剖析:

(1)参考资料:

参考1:https://blog.csdn.net/qq_41570269/article/details/106118065

参考2:http://m.bubuko.com/infodetail-1885217.html

 

3、解决方案:

 

posted on 2021-11-18 15:13  LankeHome  阅读(2086)  评论(0编辑  收藏  举报