· 8 years ago · Feb 09, 2018, 10:16 AM
1create table test(
2name string,
3age int,
4createtime
5)
6partitioned by (year string, month string ,day string, hour string)
7stored as textfile;
8
9alter table test
10add if not exists partition (year="${year}",month="${month}",day="${day}",hour="${hour}")
11location "/data/testdb/test/${year}/${month}/${day}/${hour}";