1、 创建外部表employee,字段为:name,age,city,area
create external table employee(name string,age int,city string,area string) row format delimited fields terminated by "," location "/data";
2、创建分区表pemp,字段同上,分区字段从上述四个字段中选择合适的字段
create table pemp(age int,city string,area string)partitioned by (name string)row format delimited fieldsterminated by "," location "/data";
3、加载实验数据.csv中数据到表employee
load data local inpath "/root/cc.txt" into table employee;
4、导入相同的数据到pemp表中