我尝试将我的csv数据导入hive
我的查询:
CREATE EXTERNAL TABLE student(Stud_name String,dept String,year String)
> ROW FORMAT serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
> with serdeproperties (
> "separatorChar" = ","
> )
> STORED AS TEXTFILE
> LOCATION '/home/codewarrior/Desktop/csv';
答案 0 :(得分:0)
您可以尝试使用此代码: CREATE EXTERNAL TABLE student(Stud_name String,dept String,year String) 行格式为已删除的字段,由',' location' / home / codewarrior / Desktop / csv';