Hi, I have persisted lots of JSON files on S3 under partitioned directories
such as /bucket/table1/dt=2017-10-28/bar=hello/*

1. Now I created a hive table:
CREATE EXTERNAL TABLE table1 (.... )
PARTITIONED BY (dt string, bar string) ROW FORMAT serde
'org.apache.hive.hcatalog.data.JsonSerDe' LOCATION 's3://bucket/table1';

2. Under hive commandline
select * from table1;    // return nothing

3. INSERT INTO TABLE  table1 PARTITION (dt='2017-08-28', bar='hello')
select ....;

4. now select * from table1;    // return all the data from that partition

5. select count(*) from table1;  // returns 1

Can someone explain what did  I miss?

Thanks a lot!

Reply via email to