<?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: Issue with identity key column in databricks? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22899#M15769</link>
    <description>&lt;P&gt;yes, by default option allow duplicated values per design.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will avoid this option and use only use GENERATED ALWAYS AS IDENTITY&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using BY DEFAULT option is worse than not using it at all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in BY Default option, &lt;/P&gt;&lt;P&gt;If I forget to set starting value, the ID will be generated from&lt;/P&gt;&lt;P&gt; a lower value and will grow and overlap existing values.&lt;span class="lia-unicode-emoji" title=":ghost:"&gt;👻&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2022 21:25:29 GMT</pubDate>
    <dc:creator>lizou</dc:creator>
    <dc:date>2022-11-16T21:25:29Z</dc:date>
    <item>
      <title>Issue with identity key column in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22897#M15767</link>
      <description>&lt;P&gt;For the identity key I've used both &lt;/P&gt;&lt;P&gt;GENERATED ALWAYS AS IDENTITY(start with 1 increment by 1) and&lt;/P&gt;&lt;P&gt;GENERATED BY DEFAULT AS IDENTITY(start with 1 increment by 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in both cases, if I'm running my script once then it is fine (identity key is working as it should be) but when I'm running it second time the old one is getting removed and new identity key is being generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: let's suppose I'm inserting 10 rows in the table and running the script then identity key is being generated from 1 to 10. but second time when I'm running the script identity is generating from 11 to 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's the issue.&lt;/P&gt;&lt;P&gt;I'm also trying to truncate the table but not fruitfull. Using DBR Version 10.4 &lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 07:28:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22897#M15767</guid>
      <dc:creator>ramankr48</dc:creator>
      <dc:date>2022-11-10T07:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with identity key column in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22898#M15768</link>
      <description>&lt;P&gt;Can you share the script you are running?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 13:25:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22898#M15768</guid>
      <dc:creator>elgeo</dc:creator>
      <dc:date>2022-11-10T13:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with identity key column in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22899#M15769</link>
      <description>&lt;P&gt;yes, by default option allow duplicated values per design.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will avoid this option and use only use GENERATED ALWAYS AS IDENTITY&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using BY DEFAULT option is worse than not using it at all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in BY Default option, &lt;/P&gt;&lt;P&gt;If I forget to set starting value, the ID will be generated from&lt;/P&gt;&lt;P&gt; a lower value and will grow and overlap existing values.&lt;span class="lia-unicode-emoji" title=":ghost:"&gt;👻&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 21:25:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-identity-key-column-in-databricks/m-p/22899#M15769</guid>
      <dc:creator>lizou</dc:creator>
      <dc:date>2022-11-16T21:25:29Z</dc:date>
    </item>
  </channel>
</rss>

