<?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: Migrating external tables to managed tables from HMS to UC in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156183#M54381</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/229230"&gt;@yanchr&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;Yes if the table can first be registered as a UC external table, then ALTER TABLE ... SET MANAGED is now the better practice than doing a direct DEEP CLONE&amp;nbsp;especially on DBR 17+ / serverless.&lt;/P&gt;&lt;P&gt;It is recommended to use&amp;nbsp;SET MANAGED for converting UC external tables to managed tables because it minimizes reader or writer downtime, handles concurrent writes, keeps the same table name/configuration/permissions/views, retains table history and supports rollback to external within 14 days. &amp;nbsp;It also copies data in two phases: first with no downtime, then a short switch step which is why downtime is usually lower than DEEP CLONE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would use this rule &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can use direct DEEP CLONE mainly when you cannot use SYNC/external registration for example hive managed tables stored in workspace storage/DBFS root or cases where you intentionally want a new independent managed copy.&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2026 16:37:48 GMT</pubDate>
    <dc:creator>amirabedhiafi</dc:creator>
    <dc:date>2026-05-05T16:37:48Z</dc:date>
    <item>
      <title>Migrating external tables to managed tables from HMS to UC</title>
      <link>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156170#M54377</link>
      <description>&lt;P&gt;I think the easiest way to do that is to use DEEP CLONE. However, since the SET MANAGED approach was introduced in DBR 17, wouldn't it be better to first migrate the table as external and then convert it to managed using SET MANAGED? The Databricks article indicates that it shows great performance. What is the best practice?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 14:05:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156170#M54377</guid>
      <dc:creator>yanchr</dc:creator>
      <dc:date>2026-05-05T14:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating external tables to managed tables from HMS to UC</title>
      <link>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156180#M54379</link>
      <description>&lt;P&gt;Where &lt;STRONG&gt;SET MANAGED&lt;/STRONG&gt; is supported, it has replaced &lt;STRONG&gt;DEEP CLONE&lt;/STRONG&gt; as the primary migration path for UC Delta tables. DEEP CLONE is now more of a fallback tool.&lt;/P&gt;
&lt;P&gt;Below are &lt;STRONG&gt;3 options&lt;/STRONG&gt;.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;UC external → UC managed with &lt;CODE&gt;ALTER TABLE … SET MANAGED&lt;/CODE&gt; (DBR 17+) – &lt;EM&gt;preferred&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Databricks explicitly recommends &lt;STRONG&gt;SET MANAGED&lt;/STRONG&gt; over CTAS/DEEP CLONE for converting UC external tables to managed because it:
&lt;UL&gt;
&lt;LI&gt;Preserves full table history.&lt;/LI&gt;
&lt;LI&gt;Minimizes downtime using a two-phase background copy (typical writer downtime ~1–5 minutes, readers often no downtime).&lt;/LI&gt;
&lt;LI&gt;Keeps the same table name, permissions, comments, configs, and adds path-based redirect for legacy code.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Best practice:&lt;/STRONG&gt; If you can get your table into &lt;STRONG&gt;UC external Delta&lt;/STRONG&gt;, then run &lt;CODE&gt;SET MANAGED&lt;/CODE&gt;. That is the “easy button”.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;UC managed → UC external (same location) → &lt;CODE&gt;SET MANAGED&lt;/CODE&gt; in new managed location – &lt;EM&gt;advanced but strongest semantics&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For moving existing &lt;STRONG&gt;managed&lt;/STRONG&gt; tables to a new managed location while preserving &lt;EM&gt;full history&lt;/EM&gt; and supporting concurrent writes with ~1–2 min downtime, the pattern of &lt;STRONG&gt;managed → external → &lt;CODE&gt;ALTER TABLE … SET MANAGED&lt;/CODE&gt;&lt;/STRONG&gt; is an alternative to pure DEEP CLONE, assuming DBR 17+ and the catalog already has the desired managed location configured.&lt;/LI&gt;
&lt;LI&gt;This is more operationally complex than a straight DEEP CLONE, but you get the &lt;STRONG&gt;SET MANAGED&lt;/STRONG&gt; benefits (history, minimal downtime, no namespace change).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;DEEP CLONE – &lt;EM&gt;still useful in some cases&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Still a good choice when:
&lt;UL&gt;
&lt;LI&gt;You’re &lt;STRONG&gt;changing format&lt;/STRONG&gt; (e.g., Parquet → Delta) or coming from non-UC / foreign sources where SET MANAGED doesn’t apply.&lt;/LI&gt;
&lt;LI&gt;You want a &lt;STRONG&gt;one-off copy&lt;/STRONG&gt; (e.g., DR dry runs, sandboxing, moving between catalogs/metastores where you actually want a new table and don’t need history continuity).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Trade-offs: duplicates data, does &lt;STRONG&gt;not&lt;/STRONG&gt; preserve version history across the move, and generally has more visible downtime than SET MANAGED in the external→managed scenarios.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Recommendation:&lt;/STRONG&gt;&lt;BR /&gt;Given you’re on &lt;STRONG&gt;DBR 17+&lt;/STRONG&gt; and talking about tables that can be represented as &lt;STRONG&gt;UC external Delta&lt;/STRONG&gt;, the current best practice is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Prefer a SET-MANAGED–based path over a pure DEEP CLONE&lt;/STRONG&gt;, especially when you care about:
&lt;UL&gt;
&lt;LI&gt;preserving table history,&lt;/LI&gt;
&lt;LI&gt;minimizing writer/reader downtime, and&lt;/LI&gt;
&lt;LI&gt;avoiding duplicate data and code changes.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So you are right: &lt;STRONG&gt;“first migrate as external, then &lt;CODE&gt;SET MANAGED&lt;/CODE&gt; to managed” is now the better option than relying solely on DEEP CLONE&lt;/STRONG&gt;, and DEEP CLONE should be reserved for cases where SET MANAGED simply doesn’t apply or you intentionally want a fresh copy.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 16:06:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156180#M54379</guid>
      <dc:creator>Lu_Wang_ENB_DBX</dc:creator>
      <dc:date>2026-05-05T16:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating external tables to managed tables from HMS to UC</title>
      <link>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156183#M54381</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/229230"&gt;@yanchr&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;Yes if the table can first be registered as a UC external table, then ALTER TABLE ... SET MANAGED is now the better practice than doing a direct DEEP CLONE&amp;nbsp;especially on DBR 17+ / serverless.&lt;/P&gt;&lt;P&gt;It is recommended to use&amp;nbsp;SET MANAGED for converting UC external tables to managed tables because it minimizes reader or writer downtime, handles concurrent writes, keeps the same table name/configuration/permissions/views, retains table history and supports rollback to external within 14 days. &amp;nbsp;It also copies data in two phases: first with no downtime, then a short switch step which is why downtime is usually lower than DEEP CLONE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would use this rule &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can use direct DEEP CLONE mainly when you cannot use SYNC/external registration for example hive managed tables stored in workspace storage/DBFS root or cases where you intentionally want a new independent managed copy.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 16:37:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/migrating-external-tables-to-managed-tables-from-hms-to-uc/m-p/156183#M54381</guid>
      <dc:creator>amirabedhiafi</dc:creator>
      <dc:date>2026-05-05T16:37:48Z</dc:date>
    </item>
  </channel>
</rss>

