1.连接同《hive创建分区表》
2.创建双分区表
create table t_day_hour(id int,name string,age int) partitioned by(dt string,hour string) row format delimited fields terminated by ',';
3.导入数据
LOAD DATA local INPATH '/opt/data/hivedata/3.txt' INTO TABLE t_day_hour partition(dt='20200322',hour='08');
LOAD DATA local INPATH '/opt/data/hivedata/3.txt' INTO TABLE t_day_hour partition(dt='20200323',hour='08');
4.查询数据
select * from t_day_hour;