<?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>topic Re: Issue in renaming the table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132470#M49503</link>
    <description>&lt;P&gt;So after step alter table a to table b we need to run alter table table name set location ? And we did not faced this in our cdp environment&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Sep 2025 15:33:31 GMT</pubDate>
    <dc:creator>Rajasaiharish</dc:creator>
    <dc:date>2025-09-18T15:33:31Z</dc:date>
    <item>
      <title>Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132452#M49494</link>
      <description>&lt;P&gt;We have tried to rename a table&lt;/P&gt;&lt;P&gt;Ex: alter rename tablea to tableb&lt;/P&gt;&lt;P&gt;while we checked the table b properties we are seeing the tableb location is being pointed to tablea location.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 14:22:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132452#M49494</guid>
      <dc:creator>Rajasaiharish</dc:creator>
      <dc:date>2025-09-18T14:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132456#M49495</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/184749"&gt;@Rajasaiharish&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thats expected behaviour&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if you run&amp;nbsp;DESCRIBE EXTENDED tableb; you might see that it could point the same location as tablea.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are just renaming not changing the location right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 14:34:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132456#M49495</guid>
      <dc:creator>Khaja_Zaffer</dc:creator>
      <dc:date>2025-09-18T14:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132459#M49496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/184749"&gt;@Rajasaiharish&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Just like&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/173840"&gt;@Khaja_Zaffer&lt;/a&gt;&amp;nbsp; correctly suggested - renaming table doesn't change its location. If you want to change location as well use following command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE table_name SET LOCATION path_to_the_new_location&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 14:39:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132459#M49496</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-18T14:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132463#M49499</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/184749"&gt;@Rajasaiharish&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The above is expected by design.&lt;CODE data-start="182" data-end="205"&gt;ALTER TABLE RENAME TO&lt;/CODE&gt; updates only the &lt;EM data-start="223" data-end="235"&gt;table name&lt;/EM&gt; in the catalog.The underlying Delta log + data files remain in the &lt;STRONG data-start="308" data-end="337"&gt;original storage location&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try setting the location to a new location&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-python"&gt;&lt;CODE&gt;ALTER TABLE table_name SET LOCATION path_to_the_new_location&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;or drop and recreate or run a CRTAS as a solution&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 15:15:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132463#M49499</guid>
      <dc:creator>K_Anudeep</dc:creator>
      <dc:date>2025-09-18T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132465#M49501</link>
      <description>&lt;P&gt;In general in CDP environment,we just rename the table and underlying location also gets changed&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 15:20:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132465#M49501</guid>
      <dc:creator>Rajasaiharish</dc:creator>
      <dc:date>2025-09-18T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132467#M49502</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/184749"&gt;@Rajasaiharish&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;Yes, that's correct! In hive/CDP (HMS word) rename operation (&lt;CODE data-start="289" data-end="309"&gt;ALTER TABLE RENAME&lt;/CODE&gt;) automatically &lt;STRONG data-start="325" data-end="358"&gt;renames the directory in HDFS&lt;/STRONG&gt; to match because Hive Metastore directly controls both the metadata &lt;EM data-start="452" data-end="457"&gt;and&lt;/EM&gt; the storage path.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But in Databricks, UC separates&amp;nbsp;&lt;STRONG&gt;logical metadata&lt;/STRONG&gt;&amp;nbsp;(catalogue/schema/table) from&amp;nbsp;&lt;STRONG&gt;physical storage.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 15:29:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132467#M49502</guid>
      <dc:creator>K_Anudeep</dc:creator>
      <dc:date>2025-09-18T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132470#M49503</link>
      <description>&lt;P&gt;So after step alter table a to table b we need to run alter table table name set location ? And we did not faced this in our cdp environment&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 15:33:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132470#M49503</guid>
      <dc:creator>Rajasaiharish</dc:creator>
      <dc:date>2025-09-18T15:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in renaming the table</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132506#M49516</link>
      <description>&lt;P&gt;Thats correct, in databricks you need to mention in detail sir.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Again my solution is not the solution marked. I need to improve solution details.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 23:36:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-in-renaming-the-table/m-p/132506#M49516</guid>
      <dc:creator>Khaja_Zaffer</dc:creator>
      <dc:date>2025-09-18T23:36:51Z</dc:date>
    </item>
  </channel>
</rss>

