现有文件为csv格式,需要导入hive中,设csv内容如下
1001,zs,23
1002,lis,24
首先创建表
create table if not exists csv2(
uid int...string,
age int
)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
stored as textfile ;
导入数据及查询...load导入csv文件?...number at tail [80, 65, 82, 49] but found [44, 50, 52, 10]
**不可以,需要先导入成textfile,之后再从临时表导入成parquet,**如下...format delimited
fields terminated by ','
stored as parquet;
-- 提取csv2的数据插入到csv3
insert