<?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 Table ID not preserved using CREATE OR REPLACE TABLE in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133396#M49830</link>
    <description>&lt;P&gt;The &lt;A href="https://chatgpt.com/c/link-to-docs" target="_blank" rel="noopener"&gt;&lt;EM&gt;When to replace a table&lt;/EM&gt;&lt;/A&gt; documentation states that using &lt;STRONG&gt;CREATE OR REPLACE TABLE&lt;/STRONG&gt; should preserve the table’s identity:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;Table contents are replaced, but the table identity is maintained.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, in my recent test the &lt;STRONG&gt;table ID changed&lt;/STRONG&gt; after running this command. Is this expected behavior?&lt;/P&gt;&lt;P&gt;For example, the transaction log shows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Version 0&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;{"metaData":{"id":"6a085d18-3aef-4c4c-890b-fb4a6f9d6888", ...}}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Version 2&lt;/STRONG&gt;: (post command)&lt;/P&gt;&lt;PRE&gt;{"metaData":{"id":"e3f5d990-2c03-483e-8cd3-a772d5d87e93", ...}}&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Should CREATE OR REPLACE TABLE ever generate a new table ID, or is this a bug?&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2025 17:44:50 GMT</pubDate>
    <dc:creator>shanisolomonron</dc:creator>
    <dc:date>2025-09-30T17:44:50Z</dc:date>
    <item>
      <title>Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133396#M49830</link>
      <description>&lt;P&gt;The &lt;A href="https://chatgpt.com/c/link-to-docs" target="_blank" rel="noopener"&gt;&lt;EM&gt;When to replace a table&lt;/EM&gt;&lt;/A&gt; documentation states that using &lt;STRONG&gt;CREATE OR REPLACE TABLE&lt;/STRONG&gt; should preserve the table’s identity:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;Table contents are replaced, but the table identity is maintained.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, in my recent test the &lt;STRONG&gt;table ID changed&lt;/STRONG&gt; after running this command. Is this expected behavior?&lt;/P&gt;&lt;P&gt;For example, the transaction log shows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Version 0&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;{"metaData":{"id":"6a085d18-3aef-4c4c-890b-fb4a6f9d6888", ...}}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Version 2&lt;/STRONG&gt;: (post command)&lt;/P&gt;&lt;PRE&gt;{"metaData":{"id":"e3f5d990-2c03-483e-8cd3-a772d5d87e93", ...}}&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Should CREATE OR REPLACE TABLE ever generate a new table ID, or is this a bug?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 17:44:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133396#M49830</guid>
      <dc:creator>shanisolomonron</dc:creator>
      <dc:date>2025-09-30T17:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133397#M49831</link>
      <description>&lt;P&gt;Yes that's correct. The table identity is preserved in case of delta tables. If the table is non delta it will not be preserved.&lt;/P&gt;&lt;P&gt;Can you also confirm if the table you are recreating have schema changes. Because sometimes&amp;nbsp;&lt;STRONG&gt;CREATE OR REPLACE TABLE&amp;nbsp;&lt;/STRONG&gt;with change in column definitions, table properties&amp;nbsp; or format may be treated as drop and recreate operation internally which might result in id lost.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 18:47:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133397#M49831</guid>
      <dc:creator>nayan_wylde</dc:creator>
      <dc:date>2025-09-30T18:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133405#M49834</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/79394"&gt;@nayan_wylde&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/185660"&gt;@shanisolomonron&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think it works in the way you've described. We can easily check this. Each time I execute following code I get new id:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%sql
CREATE OR REPLACE TABLE databricks_demo_ws.default.my_table (
  id int,
  name string
)&lt;/LI-CODE&gt;&lt;P&gt;So, first time I've exectued above code I got id:&amp;nbsp;&lt;SPAN&gt;f2a57c4-152b-46c4-9dd5-b1e945846d71&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then I execute above code second time. As you can see, no major schema changes occured but still I got completly new id: 641cacab-7175-4f44-98cc-fad9ba8aa66e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I think what they refer in docs as table identity is more related to catalog / metadata identity (not necessarily the same as the internal delta log id). Because all other things mentioned in documentation hold:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The table history is retained, and I can revert the table to an earlier version with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;RESTORE&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command.&lt;/LI&gt;&lt;LI&gt;The operation is a single transaction, so there is never a time when the table doesn't exist.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 20:15:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133405#M49834</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-30T20:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133409#M49835</link>
      <description>&lt;P&gt;Waiting for a databricks employee to clarify this item.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 20:38:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133409#M49835</guid>
      <dc:creator>shanisolomonron</dc:creator>
      <dc:date>2025-09-30T20:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133764#M49920</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/185660"&gt;@shanisolomonron&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a UC-managed table, when you check the table properties and look at the storage path&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="1353"&gt;eg: if the Storage path is &lt;CODE class="_ca0qyh40 _u5f3m5ip _n3tdyh40 _19bvm5ip _2rko12b0 _11c81u0j _1reo1wug _18m91wug _1dqoglyw _1e0c1nu9 _bfhktkvp _16d9qvcn _syaz1fxt _vwz41kw7 _1i4q1hna _o5721jtm" data-renderer-mark="true"&gt;s3://my_uc_bucket_kr/ae32f4d9-3c84-4583-9197-ffadf942bdf4d/tables/010f12c4-0ca8-4013-9f0c-65d48538d0588&lt;/CODE&gt; , then metastore_id is `&lt;CODE class="_ca0qyh40 _u5f3m5ip _n3tdyh40 _19bvm5ip _2rko12b0 _11c81u0j _1reo1wug _18m91wug _1dqoglyw _1e0c1nu9 _bfhktkvp _16d9qvcn _syaz1fxt _vwz41kw7 _1i4q1hna _o5721jtm" data-renderer-mark="true"&gt;ae32f4d9-3c84-4583-9197-ffadf942bdf4d&lt;/CODE&gt; and the table ID is &lt;CODE class="_ca0qyh40 _u5f3m5ip _n3tdyh40 _19bvm5ip _2rko12b0 _11c81u0j _1reo1wug _18m91wug _1dqoglyw _1e0c1nu9 _bfhktkvp _16d9qvcn _syaz1fxt _vwz41kw7 _1i4q1hna _o5721jtm" data-renderer-mark="true"&gt;010f12c4-0ca8-4013-9f0c-65d48538d0588&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This table ID will be preserved and will not change after every create/replace command, even if the table structure changes.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2025 04:42:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/133764#M49920</guid>
      <dc:creator>Krishna_S</dc:creator>
      <dc:date>2025-10-04T04:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table ID not preserved using CREATE OR REPLACE TABLE</title>
      <link>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/134115#M50024</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/36904"&gt;@Krishna_S&lt;/a&gt;&amp;nbsp;thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a non UC-managed table, is it valid to see a table ID change throughout the life time of the table?&lt;/P&gt;&lt;P&gt;(Also, what value gives me to utilize UC to manage my tables?)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 20:11:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/table-id-not-preserved-using-create-or-replace-table/m-p/134115#M50024</guid>
      <dc:creator>shanisolomonron</dc:creator>
      <dc:date>2025-10-07T20:11:39Z</dc:date>
    </item>
  </channel>
</rss>

