创建hive表:
create table table_name( id string, name string, age string ) row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde' with SERDEPROPERTIES ("separatorChar"=",","quotechar"=""") STORED AS TEXTFILE;
导入数据:
load data local inpath '/home/kyang/table_name.csv' overwrite into table table_name;
将表转换成ORC表:
create table table_name_orc( id string, name string, age string )row format delimited fields terminated by " " STORED AS ORC
insert overwrite table table_name_orc select * from table_name