Hive: Add partitions for existing folder structure

前端 未结 1 466
生来不讨喜
生来不讨喜 2020-12-04 03:52

I have a folder structure in HDFS like below. However, no partitions were actually created on the table using the ALTER TABLE ADD PARTITION commands, even thou

相关标签:
1条回答
  • 2020-12-04 03:59

    Use msck repair table command:

    MSCK [REPAIR] TABLE tablename;
    

    or

    ALTER TABLE tablename RECOVER PARTITIONS;
    

    if you are running Hive on EMR.

    Read more details about both commands here: RECOVER PARTITIONS

    0 讨论(0)
提交回复
热议问题