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、解決方案:
