2012-09-11 20:32:26| 分类: 默认分类|举报|字号 订阅 指定存储格式为 Sequencefile 时,把txt格式的数据导入表中,hive 会报文件格式错(Failed with exception Wrong file format. Please check the file's format.)。 create table test1 (id int, name string,city string) row format delimited fields terminated
by ','; load data local inpath '/home/***/test.txt' into table test1; 暂时的解决方法为:先导入成textfile格式,如何需要存储为sequence格式,再可以 insert 到sequence 格式的表中。 create table test1 (id int, name string,city string) row format delimited fields terminated by ',' stored as textfile;
load data local inpath '/home/***/test.txt' into table test1; create table test2( id int, name string,city string ) stored as sequencefile; insert overwrite table test2 select * from test1;