hive sequencefile导入文件遇到FAILED: SemanticException Unable to load data to destination table. Error: The file that you are trying to load does not match the file format of the destination table.错误

hive sequencefile导入文件遇到FAILED: SemanticException Unable to load data to destination table. Error: The file that you are trying to load does not match the file format of the destination table.错误

原因

这是因为SequenceFile的表不能使用load来加载数据,只能导入sequence类型的数据

解决办法

曲线救国

  • 先创建一个临时表(save as textfile),将数据导入进去,
  • 然后再导入这个表里
insert into table test_sq select * from test_text;
参考
posted @ 2017-10-23 17:53  wswang  阅读(12829)  评论(0编辑  收藏  举报