1. 程式人生 > 其它 >The file that you are trying to load does not match the file format of the destination table.

The file that you are trying to load does not match the file format of the destination table.

技術標籤:問題hive大資料hqlsql

ive匯入資料報錯

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 方式匯入