<?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 Error Creating Primary Key Constraint in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10019#M5267</link>
    <description>&lt;P&gt;I am trying to add a primary key constraint to an existing table, and I get the following error;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Cannot create or update table because the child column(s) `my_primary_key` of primary key `pk` cannot be set to nullable. Either drop the constraint, or change the column nullability.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This doesn't make sense to me... why would you want a primary key column to be nullable?  In any event, I tried to alter the column to allow nulls and still got the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate that primary keys and foreign keys in data bricks are informational only, but I want to be able to support downstream BI developers with this information if possible.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2023 11:23:07 GMT</pubDate>
    <dc:creator>najmead</dc:creator>
    <dc:date>2023-02-04T11:23:07Z</dc:date>
    <item>
      <title>Error Creating Primary Key Constraint</title>
      <link>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10019#M5267</link>
      <description>&lt;P&gt;I am trying to add a primary key constraint to an existing table, and I get the following error;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Cannot create or update table because the child column(s) `my_primary_key` of primary key `pk` cannot be set to nullable. Either drop the constraint, or change the column nullability.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This doesn't make sense to me... why would you want a primary key column to be nullable?  In any event, I tried to alter the column to allow nulls and still got the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate that primary keys and foreign keys in data bricks are informational only, but I want to be able to support downstream BI developers with this information if possible.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 11:23:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10019#M5267</guid>
      <dc:creator>najmead</dc:creator>
      <dc:date>2023-02-04T11:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error Creating Primary Key Constraint</title>
      <link>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10021#M5269</link>
      <description>&lt;P&gt;I'm not using databricks-sql-connector.  I ran the query from the query editor within databricks itself. &lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 03:35:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10021#M5269</guid>
      <dc:creator>najmead</dc:creator>
      <dc:date>2023-02-06T03:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error Creating Primary Key Constraint</title>
      <link>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10020#M5268</link>
      <description>&lt;P&gt;Hi, Could you please confirm if you are using the latest databricks-sql-connector ? (&lt;A href="https://pypi.org/project/databricks-sql-connector/" alt="https://pypi.org/project/databricks-sql-connector/" target="_blank"&gt;https://pypi.org/project/databricks-sql-connector/&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 13:18:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-creating-primary-key-constraint/m-p/10020#M5268</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-02-05T13:18:28Z</dc:date>
    </item>
  </channel>
</rss>

