问题描述
我已经创建了一个表测试,并且该表的位置是s3://mocktest/test
I have created one table test and its partion with this location is s3://mocktest/test
现在,我想将表格位置更新为s3://mocktest/test-new
所以我用ALTER TABLE test set LOCATION s3://mocktest/test-new
查询位置会在测试表中更新,但不会在分区表中更新.
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
querylocation is updated in test table but not in the partion table.
推荐答案
现有分区的位置与表的位置无关.如果要移动所有分区的位置,则需要分别更改每个分区.在更改表的位置后运行MSCK REPAIR TABLE …
时,它将在新位置中查找新分区,但不会更改任何现有分区.
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.
这篇关于更改雅典娜桌子的位置时,分区位置是否会自动更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!