0
votes

I have an external hive table which has partitions like year = 2017, year = 2018 and inside them I've partitions for each month for year = 2017 and year = 2018 as well.

My questions are:

  1. If I drop partition year = 2017, will it drop all the month partitions for year = 2017?

  2. what will happen in case of internal tables?

1

1 Answers

0
votes

Yes, hive drops all the month partitions/sub partititons including data in file system(HDFS..etc) inside year=2017 in case of internal tables.

In case of external tables data will not be dropped from file system(HDFS) but hive drops the partition information from hive table metadata.