<?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: Creating a Primary Key for Lakehouse Table in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4833401#M12487</link>
    <description>&lt;P&gt;Hello, if anyone is interested in primary and foreign keys support in Lakehouse I created a new feature request in Idea portal. I used this post as reference in the request.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Primary-and-Foreign-key-support-in-Lakehouse/idi-p/4833394#M163888" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Fabric-Ideas/Primary-and-Foreign-key-support-in-Lakehouse/idi-p/4833394#M163888&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Sep 2025 12:38:58 GMT</pubDate>
    <dc:creator>dprenc_elixirr</dc:creator>
    <dc:date>2025-09-23T12:38:58Z</dc:date>
    <item>
      <title>Creating a Primary Key for Lakehouse Table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4742452#M10401</link>
      <description>&lt;P&gt;Hi, Can we create Primary key constraints in a Lakehouse table? If so how and if no why wasn't it available?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have tried creating by using Alter table and not enforced. But it's giving an error.&lt;/P&gt;&lt;P&gt;Error message -&amp;nbsp;Table constraints (Primary and Foreign key) are not supported in V2 Datasource tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 13:28:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4742452#M10401</guid>
      <dc:creator>ESharathChandra</dc:creator>
      <dc:date>2025-06-24T13:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Primary Key for Lakehouse Table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4742613#M10405</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1294525"&gt;@ESharathChandra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create primary key constraints using the ALTER TABLE statement, but only with the following conditions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The primary key must be NONCLUSTERED&lt;BR /&gt;It must be NOT ENFORCED&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE TABLE MyTable (
    id INT NOT NULL,
    name STRING
);

ALTER TABLE MyTable
ADD CONSTRAINT PK_MyTable PRIMARY KEY NONCLUSTERED (id) NOT ENFORCED;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 24 Jun 2025 15:29:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4742613#M10405</guid>
      <dc:creator>wardy912</dc:creator>
      <dc:date>2025-06-24T15:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Primary Key for Lakehouse Table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4743112#M10414</link>
      <description>&lt;P&gt;Thank you for quick response&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/475583"&gt;@wardy912&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When tried creating in &lt;STRONG&gt;lakehouse&lt;/STRONG&gt; using &lt;STRONG&gt;notebook &lt;/STRONG&gt;but getting below error :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ESharathChandra_0-1750833030844.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1278735i51509C57CB3187E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ESharathChandra_0-1750833030844.png" alt="ESharathChandra_0-1750833030844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I guess it's working in &lt;STRONG&gt;warehouse&lt;/STRONG&gt; but not in &lt;STRONG&gt;lakehouse&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 06:32:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4743112#M10414</guid>
      <dc:creator>ESharathChandra</dc:creator>
      <dc:date>2025-06-25T06:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Primary Key for Lakehouse Table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4743360#M10420</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1294525"&gt;@ESharathChandra&lt;/a&gt;,&lt;BR /&gt;Thank you for reaching out to the Microsoft Fabric Community.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, Microsoft Fabric's Lakehouse tables (V2 Datasource, based on Delta Lake) do not support primary key or foreign key constraints, even with the NOT ENFORCED option. This is why you're encountering the error: "Table constraints (Primary and Foreign key) are not supported in V2 Datasource tables."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The Lakehouse in Fabric is designed for big data analytics and uses Delta Lake as its storage format. Delta Lake prioritizes scalability and performance over traditional relational database constraints like primary keys, which are more common in OLTP systems. Instead, data integrity is typically managed through ETL/ELT processes or data quality checks.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We recommend that you submit this feature request to the Ideas forum: &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas" target="_blank"&gt;Fabric Ideas - Microsoft Fabric Community&lt;/A&gt;, If the idea receives enough community support through votes, the Microsoft product team may consider it for future releases.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this information is helpful, please &lt;STRONG&gt;“Accept as solution”&lt;/STRONG&gt; and give a &lt;STRONG&gt;"kudos"&lt;/STRONG&gt; to assist other community members in resolving similar issues more efficiently.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 09:22:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4743360#M10420</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-06-25T09:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Primary Key for Lakehouse Table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4833401#M12487</link>
      <description>&lt;P&gt;Hello, if anyone is interested in primary and foreign keys support in Lakehouse I created a new feature request in Idea portal. I used this post as reference in the request.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Primary-and-Foreign-key-support-in-Lakehouse/idi-p/4833394#M163888" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Fabric-Ideas/Primary-and-Foreign-key-support-in-Lakehouse/idi-p/4833394#M163888&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 12:38:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Creating-a-Primary-Key-for-Lakehouse-Table/m-p/4833401#M12487</guid>
      <dc:creator>dprenc_elixirr</dc:creator>
      <dc:date>2025-09-23T12:38:58Z</dc:date>
    </item>
  </channel>
</rss>

