<?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 ALTER SCHEMA in Synapse Warehouse in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/ALTER-SCHEMA-in-Synapse-Warehouse/m-p/3723094#M677</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I would like to transfer tables to a different schema than [dbo] after loading it to a Warehouse with Dataflow gen 2. Is it safe to run ALTER SCHEMA in a SQL query in from Fabric Synapse Warehouse?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tsql-surface-area" target="_blank" rel="noopener"&gt;T-SQL surface area - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 07:21:55 GMT</pubDate>
    <dc:creator>BiJoe</dc:creator>
    <dc:date>2024-02-26T07:21:55Z</dc:date>
    <item>
      <title>ALTER SCHEMA in Synapse Warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/ALTER-SCHEMA-in-Synapse-Warehouse/m-p/3723094#M677</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to transfer tables to a different schema than [dbo] after loading it to a Warehouse with Dataflow gen 2. Is it safe to run ALTER SCHEMA in a SQL query in from Fabric Synapse Warehouse?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tsql-surface-area" target="_blank" rel="noopener"&gt;T-SQL surface area - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 07:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/ALTER-SCHEMA-in-Synapse-Warehouse/m-p/3723094#M677</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2024-02-26T07:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: ALTER SCHEMA in Synapse Warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/ALTER-SCHEMA-in-Synapse-Warehouse/m-p/3723323#M678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451446" data-lia-user-login="BiJoe" class="lia-mention lia-mention-user"&gt;BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;/P&gt;
&lt;P data-sourcepos="1:1-1:164"&gt;While ALTER SCHEMA exists in Transact-SQL, it's not recommended to use it in a Fabric Synapse Warehouse for transferring tables between schemas. Here's why:&lt;/P&gt;
&lt;P data-sourcepos="3:1-3:60"&gt;Limitations of ALTER SCHEMA in Fabric Synapse Warehouse:&lt;/P&gt;
&lt;UL data-sourcepos="5:1-8:0"&gt;
&lt;LI data-sourcepos="5:1-5:160"&gt;Limited Functionality:&amp;nbsp;Unlike SQL Server, Fabric Warehouse has&amp;nbsp;limited functionality&amp;nbsp;for modifying schema objects like tables using&amp;nbsp;ALTER SCHEMA.&lt;/LI&gt;
&lt;LI data-sourcepos="6:1-6:189"&gt;Compatibility Issues:&amp;nbsp;Using&amp;nbsp;ALTER SCHEMA&amp;nbsp;might not be fully compatible with other data modification operations in Fabric Warehouse and could lead to unexpected behavior or errors.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I tried to repro using this SQL code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The code ran successfully. The table's schema also got changed. But when Iam trying to load the data, its giving me an error.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, I wouldnt suggest you to alter the schema. Instead create a clone of the table using the new schema. You can do this by following the below steps:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information please refer to this link:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/clone-table" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-warehouse/clone-table&lt;/A&gt;&lt;BR /&gt;This will create a copy of the table. You can delete the dbo.Table after creating the clone.&amp;nbsp;&lt;BR /&gt;Hope this helps. Please let me know if you have any further questions.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 08:48:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/ALTER-SCHEMA-in-Synapse-Warehouse/m-p/3723323#M678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T08:48:53Z</dc:date>
    </item>
  </channel>
</rss>

