Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ALTER TABLE RECOVER PARTITIONS not working

avatar
New Contributor

Hi,

 

When I run an ALTER TABLE RECOVER PARTITIONS, my Impala table is not getting updated with the most recent data. All the parquet files are in the proper directory. 

 

However, when I run a REFRESH TABLE, the table gets updated with the new data.

 

Why is the ALTER TABLE RECOVER PARTITIONS command not working in this case, but the REFRESH TABLE does?

 

Thank you!

1 REPLY 1

avatar
Contributor

It depends on how you are updating your partitions. Are you creating completely new partitions, or adding files to existing partitions? ALTER TABLE RECOVER PARTITIONS is specifically used for adding newly created partition directories to a partitioned table - https://impala.apache.org/docs/build/html/topics/impala_alter_table.html