Does the partion location change automatically when the athena table's location is changed?

自古美人都是妖i 提交于 2020-06-18 02:45:07

问题


I have created one table test and its partion with this location is s3://mocktest/test

Now, I want to update my table location to s3://mocktest/test-new so that I used ALTER TABLE test set LOCATION s3://mocktest/test-new query location is updated in test table but not in the partion table.

'MSCK REPAIR TABLE' command not working for update the partion


回答1:


The location of existing partitions is not related to the location of the table. If you want to move the location of all partitions you need to change each of them individually. When you run MSCK REPAIR TABLE … after changing the location of a table it will look for new partitions in the new location, but not change any existing partitions.



来源:https://stackoverflow.com/questions/55181583/does-the-partion-location-change-automatically-when-the-athena-tables-location

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!