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;
参考
    原文作者:wswang
    原文地址: https://www.cnblogs.com/wswang/p/7718114.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞