Re: partitioned hive table

2017-10-31 Thread Furcy Pin
Hi, If you want to load pre-existing records, instead of inserting data in this partition, you should use the ADD PARTITION statement https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AddPartitions or simply the MSCK REPAIR TABLE statement https://cwiki.apache.

Re: partitioned hive table

2017-10-30 Thread Jiewen Shao
Thanks Mich, ANALYZE TABLE PARTITION(dt='2017-08-20, bar='hello'') COMPUTE STATISTICS indeed make count(*) returns correct value (for the partition only). but my hive table was not able to get data from those pre-existed json file unless I insert one record for the partition AND run ANALYZE TABLE

Re: partitioned hive table

2017-10-30 Thread Mich Talebzadeh
have you analyzed table for the partition? ANALYZE TABLE test_table PARTITION('2017-08-20, bar='hello'') COMPUTE STATISTICS; and do count(*) from table Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw