一列将数据加载到Hive表中

时间:2018-07-09 21:25:52

标签: hadoop hive hdfs

我像这样在Hive中创建了一个表,

create table ratings(genre string) row format delimited lines terminated by '\n' stored as textfile;

我的输入文件的格式为

text1
text2
text3

我希望将输入文件中的所有行插入到Hive表的Genre列中。

我跑步时

LOAD DATA INPATH '/Movies/Input/part-m-00000' INTO table ratings;

我收到此错误-

Failed with exception Wrong file format. Please check the file's 
format.FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.MoveTask

0 个答案:

没有答案