admin管理员组

文章数量:1635968

Hive导入数据报错

Hive load data local inpath … into table … 出错

报错信息:org.apache.hadoop.hive.ql.parse.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.

原表建表语句

create table lhn(
    id int,
    name string
)row format delimited fields terminated by '\t';

错误原因

Hive 3.x系列不支持load data 命令向内部表导入数据

解决办法

1.创建外部表
2.创建临时表再用 select 方式导入

本文标签: MATCHloadfiletabledestination