Hive 无法在CLI中查看配置单元表数据(存储为拼花文件格式)

Hive 无法在CLI中查看配置单元表数据(存储为拼花文件格式),hive,hiveql,parquet,Hive,Hiveql,Parquet,我已将配置单元表保存为拼花格式,并成功地将本地数据加载到其中。在表上执行select操作时,出现以下错误: Failed with exception java.io.IOException:java.lang.RuntimeException: hdfs://localhost.localdomain:9000/user/hive/warehouse/practice.db/studentam/studarray is not a Parquet file. expected magic nu

我已将配置单元表保存为拼花格式,并成功地将本地数据加载到其中。在表上执行select操作时,出现以下错误:

Failed with exception java.io.IOException:java.lang.RuntimeException: hdfs://localhost.localdomain:9000/user/hive/warehouse/practice.db/studentam/studarray is not a Parquet file. expected magic number at tail [80, 65, 82, 49] but found [48, 48, 54, 10]
Time taken: 0.434 seconds


create table studentAM(id int,name string,subject array<string>,mark map<string,int>,year int) row format delimited fields terminated by ',' collection items terminated by '#' map keys terminated by '$' lines terminated by '\n' stored as parquet;

file content:

1,subhash,math#eng#science,math$67#eng$60#science$85,2006
2,kundan,geo#social#pol,geo$79#social$70#pol$81,2007
3,sakesh,eng#math,eng$89#math$75,2006

load data local inpath 'studarray' into table studentam;

步骤1:创建具有类似列的文本表格

步骤2:将数据加载到文本表格中

步骤3:将数据从文本表格插入拼花地板表格

  insert into Parquet_table as select * from text_table;