· 8 years ago · Jan 25, 2018, 03:20 PM
1CREATE EXTERNAL TABLE `xxx_tmp1`(
2 `columnA` string,
3 `columnB` int',
4 `columnC` string)
5PARTITIONED BY (
6 `d` string)
7LOCATION
8 's3://($BUCKET)'
9
10ALTER TABLE xxx_tmp1 ADD IF NOT EXISTS PARTITION (d='2018-01-23')
11
12select count(*) from xxx_tmp1 where d='2018-01-23'
13
14select count(*) from xxx_tmp1 where d='2018-01-23' limit 10
15
16select count(columnA) from xxx_tmp1 where d='2018-01-23'