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.错误

时间:2023-03-09 06:37:48
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;
参考