<?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 Identity Column Issues in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/identity-column-issues/m-p/4148#M948</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experiencing what I'm believe are pretty severe (current) shortcomings regarding Identity columns in Databricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm defining a SQL table using spark SQL - the table creates as exepcted; I've tried using both column definitions for this identity column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="CreateTable"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/178i0F881069A10D9620/image-size/large?v=v2&amp;amp;px=999" role="button" title="CreateTable" alt="CreateTable" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I define the table using &lt;B&gt;Generated Always&lt;/B&gt; I get the following error when inserting records:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Insert-GeneratedAlways"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/186i3D0955B5D6D82D56/image-size/large?v=v2&amp;amp;px=999" role="button" title="Insert-GeneratedAlways" alt="Insert-GeneratedAlways" /&gt;&lt;/span&gt;I'm certain I am not providing any column values targeted for the identity column within the insert statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I define the table using &lt;B&gt;Generated By Default&lt;/B&gt; this statement executes and inserts data, but the identity column is completely NULL:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Command success"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/185i05AA6072D91B1FA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Command success" alt="Command success" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/181i77452877C9489CEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, I'm on Azure DBR 12.2 LTS. I've tried on the 13.0 DBR, but still nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything obvious I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2023 15:17:29 GMT</pubDate>
    <dc:creator>AJK1</dc:creator>
    <dc:date>2023-05-19T15:17:29Z</dc:date>
    <item>
      <title>Identity Column Issues</title>
      <link>https://community.databricks.com/t5/data-engineering/identity-column-issues/m-p/4148#M948</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm experiencing what I'm believe are pretty severe (current) shortcomings regarding Identity columns in Databricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm defining a SQL table using spark SQL - the table creates as exepcted; I've tried using both column definitions for this identity column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="CreateTable"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/178i0F881069A10D9620/image-size/large?v=v2&amp;amp;px=999" role="button" title="CreateTable" alt="CreateTable" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I define the table using &lt;B&gt;Generated Always&lt;/B&gt; I get the following error when inserting records:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Insert-GeneratedAlways"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/186i3D0955B5D6D82D56/image-size/large?v=v2&amp;amp;px=999" role="button" title="Insert-GeneratedAlways" alt="Insert-GeneratedAlways" /&gt;&lt;/span&gt;I'm certain I am not providing any column values targeted for the identity column within the insert statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I define the table using &lt;B&gt;Generated By Default&lt;/B&gt; this statement executes and inserts data, but the identity column is completely NULL:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Command success"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/185i05AA6072D91B1FA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Command success" alt="Command success" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/181i77452877C9489CEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, I'm on Azure DBR 12.2 LTS. I've tried on the 13.0 DBR, but still nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything obvious I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 15:17:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identity-column-issues/m-p/4148#M948</guid>
      <dc:creator>AJK1</dc:creator>
      <dc:date>2023-05-19T15:17:29Z</dc:date>
    </item>
  </channel>
</rss>

