<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: hive 执行rename后，表的location没有相应发生改变 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349695#M235739</link>
    <description>&lt;P&gt;I didn't notice that the property "external" is case sensitive,the step 2 should be&amp;nbsp;&lt;SPAN&gt;ALTER TABLE alter_test SET TBLPROPERTIES('EXTERNAL'='false'); ,then the location would be changed in CDP7.1.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And In CDP 7.1.7, It does not work even if I set property "TRANSLATED_TO_EXTERNAL" to&amp;nbsp; true after creating table ,could you try the steps and give an attachment? thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 08:56:36 GMT</pubDate>
    <dc:creator>xinghx</dc:creator>
    <dc:date>2022-08-08T08:56:36Z</dc:date>
    <item>
      <title>hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349317#M235615</link>
      <description>&lt;P&gt;当前Hive版本：3.1.3000.7.1.7.0-551&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;创建hive外部表： CREATE TABLE IF NOT EXISTS `alter_test` (a string,b string) STORED AS ORC TBLPROPERTIES("transactional"="false");&lt;/LI&gt;&lt;LI&gt;转hive内部表：ALTER TABLE alter_test SET TBLPROPERTIES('external'='false');&lt;/LI&gt;&lt;LI&gt;重命名：ALTER TABLE alter_test RENAME TO alter_test_bak;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;注：external.table.purge 这个配置是一直为true的&lt;/P&gt;&lt;P&gt;此时，表alter_test_bak的location目录名称依然是alter_test。&lt;/P&gt;&lt;P&gt;同样的操作步骤，我在Hive版本 3.1.3000.7.1.1.0-565是可以同步更改location目录名的，请问这是怎么回事呢&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 07:51:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349317#M235615</guid>
      <dc:creator>xinghx</dc:creator>
      <dc:date>2026-04-21T07:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349378#M235634</link>
      <description>&lt;P&gt;English Translation:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After hive executes rename, the location of the table does not change accordingly&lt;/P&gt;
&lt;P&gt;Current Hive version: 3.1.3000.7.1.7.0-551&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Create hive external table: CREATE TABLE IF NOT EXISTS `alter_test` (a string,b string) STORED AS ORC TBLPROPERTIES("transactional"="false");&lt;BR /&gt;Turn hive internal table: ALTER TABLE alter_test SET TBLPROPERTIES('external'='false');&lt;BR /&gt;Rename: ALTER TABLE alter_test RENAME TO alter_test_bak;&lt;BR /&gt;Note: the external.table.purge configuration is always true&lt;/P&gt;
&lt;P&gt;At this point, the location directory name of the table alter_test_bak is still alter_test.&lt;/P&gt;
&lt;P&gt;The same operation steps, I can synchronously change the location directory name in Hive version 3.1.3000.7.1.1.0-565, what is going on?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:27:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349378#M235634</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2022-08-02T15:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349450#M235664</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/90612"&gt;@xinghx&lt;/a&gt;&amp;nbsp;This is an expected behavior in later version of CDP. Please refer to &lt;A href="https://docs.cloudera.com/cdp-private-cloud-upgrade/latest/upgrade-hdp3/topics/cdp-data-migration-rename.html" target="_blank" rel="noopener"&gt;this&lt;/A&gt; Release note.&amp;nbsp; If yours is a managed table, in the default warehouse location, the HDFS path will be renamed, the way you expect it to.&lt;/P&gt;&lt;P&gt;However, if you plan to rename an External table, you will also need to change the location accordingly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ALTER TABLE &amp;lt;tableName&amp;gt; RENAME TO &amp;lt;newTableName&amp;gt;;
ALTER TABLE &amp;lt;newTableName&amp;gt; set location "hdfs://&amp;lt;location&amp;gt;";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:27:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349450#M235664</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2022-08-03T13:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349493#M235676</link>
      <description>&lt;P&gt;It's unreasonable for me because the table&amp;nbsp;i&lt;SPAN&gt;s created without a LOCATION clause and is under its database directory indeed.Besides,the release note topic is after upgrade to cdp,but it's normal in hive version&amp;nbsp;&amp;nbsp;3.1.3000.7.1.1.0-565 which is also cdp.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 01:09:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349493#M235676</guid>
      <dc:creator>xinghx</dc:creator>
      <dc:date>2022-08-04T01:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349610#M235702</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/90612"&gt;@xinghx&lt;/a&gt;&amp;nbsp;The only difference between CDP 7.1.1 and 7.1.7 is&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/HIVE-24920" target="_blank" rel="noopener"&gt;HIVE-24920&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;In your test case, the CREATE TABLE statement is creating an External table with "&lt;SPAN&gt;TRANSLATED_TO_EXTERNAL" table property set to "TRUE". Your second query to change the table to a Managed/acid table does not really work, so that query has no impact apart from just adding a table property.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now coming to the RENAME query, I notice it does not change the location in CDP 7.1.1 either. Please refer to the attachment. In CDP 7.1.7(SP1) it does change the location if we have "TRANSLATED_TO_EXTERNAL" = "TRUE", If we set it to false, we have the same behavior as 7.1.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;alter table alter_test set tblproperties("TRANSLATED_TO_EXTERNAL"="FALSE");&lt;/LI-CODE&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 09:12:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349610#M235702</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2022-08-05T09:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: hive 执行rename后，表的location没有相应发生改变</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349695#M235739</link>
      <description>&lt;P&gt;I didn't notice that the property "external" is case sensitive,the step 2 should be&amp;nbsp;&lt;SPAN&gt;ALTER TABLE alter_test SET TBLPROPERTIES('EXTERNAL'='false'); ,then the location would be changed in CDP7.1.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And In CDP 7.1.7, It does not work even if I set property "TRANSLATED_TO_EXTERNAL" to&amp;nbsp; true after creating table ,could you try the steps and give an attachment? thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 08:56:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-%E6%89%A7%E8%A1%8Crename%E5%90%8E-%E8%A1%A8%E7%9A%84location%E6%B2%A1%E6%9C%89%E7%9B%B8%E5%BA%94%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98/m-p/349695#M235739</guid>
      <dc:creator>xinghx</dc:creator>
      <dc:date>2022-08-08T08:56:36Z</dc:date>
    </item>
  </channel>
</rss>

