My s3 bucket has data partitioned by key. So my data will be at
s3://my-bucket/202001/tablenm/key=1/<data>
s3://my-bucket/202001/tablenm/key=2/<data>
s3://my-bucket/202001/tablenm/key=3/<data>
s3://my-bucket/202001/tablenm/key=4/<data>
I have a external athena table whose location is s3://my-bucket/202001/tablenm/
Now, for the next run, the data is loaded onto the same bucket but in a different month folder. So it would look something like this
s3://my-bucket/202002/tablenm/key=2/<data>
s3://my-bucket/202002/tablenm/key=3/<data>
s3://my-bucket/202002/tablenm/key=4/<data>
s3://my-bucket/202002/tablenm/key=5/<data>
I now want the table to show the data thats in s3://my-bucket/202002/tablenm/
folder. So, I then changed the location for the athena table as
alter table tablenm set location "s3://my-bucket/202002/tablenm/"
and after i did a msck repair on the table i get the error saying
partition not in metastore : key=1, key=2, key=3, key=4
Apart from dropping and re-creating the athena table with the new location, is there a way to update the metadata to point to the new location partitions?