<?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: Why are primary keys important? in Data &amp; Schema Discussions</title>
    <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5138#M398</link>
    <description>&lt;P&gt;Thank for pointing that out Randy. Completely forgot about the incremental load and the lookup. I always set primary keys so I don't run into these issues often.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any performance reasons? Why did Incorta in 2023.7 change to have the load show a failure when the primary key isn't set? Additional errors in the screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JC_Data_Wizard_0-1697048789683.png" style="width: 400px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2461i885C0616DE12B3E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JC_Data_Wizard_0-1697048789683.png" alt="JC_Data_Wizard_0-1697048789683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 18:26:56 GMT</pubDate>
    <dc:creator>JC_Data_Wizard</dc:creator>
    <dc:date>2023-10-11T18:26:56Z</dc:date>
    <item>
      <title>Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5115#M396</link>
      <description>&lt;P&gt;We noticed that starting in 2023.7 we are getting error messages in the loader status, if the&amp;nbsp;Enforce Primary Key Constraint option isn't selected with Primary keys setup in the table.&amp;nbsp; Screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JC_Data_Wizard_0-1696883505198.png" style="width: 400px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2451i91EB4C369D84DB99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JC_Data_Wizard_0-1696883505198.png" alt="JC_Data_Wizard_0-1696883505198.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Someone on our team asked why we even need primary keys on the table. Outside of the deduplication it provides, I didn't really have a good answer. There isn't much on the importance of using primary keys in the documentation or the community.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outside of deduplication why do we need primary keys set up in the table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;John Cross&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 20:37:13 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5115#M396</guid>
      <dc:creator>JC_Data_Wizard</dc:creator>
      <dc:date>2023-10-09T20:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5118#M397</link>
      <description>&lt;P&gt;"Need" is a strong word, but besides the mundane ( good practice to ID field usage ) the really important thing the key designation does is determine if an incremental load will append a row or update an existing row.&lt;/P&gt;&lt;P&gt;Additionally - might be an edge case for some users - the key designation needs to be there to allow the lookup() function to actually look something up.&amp;nbsp; &amp;nbsp;It's ( IMHO ) a big pain-in-the-neck, but I've been bitten trying to figure out why a lookup isn't working only to discover I hadn't set the key(s) properly.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 13:59:33 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5118#M397</guid>
      <dc:creator>RADSr</dc:creator>
      <dc:date>2023-10-10T13:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5138#M398</link>
      <description>&lt;P&gt;Thank for pointing that out Randy. Completely forgot about the incremental load and the lookup. I always set primary keys so I don't run into these issues often.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any performance reasons? Why did Incorta in 2023.7 change to have the load show a failure when the primary key isn't set? Additional errors in the screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JC_Data_Wizard_0-1697048789683.png" style="width: 400px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2461i885C0616DE12B3E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JC_Data_Wizard_0-1697048789683.png" alt="JC_Data_Wizard_0-1697048789683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 18:26:56 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5138#M398</guid>
      <dc:creator>JC_Data_Wizard</dc:creator>
      <dc:date>2023-10-11T18:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5140#M399</link>
      <description>&lt;P&gt;I've asked if keys impact performance and the answer I got was "no" because of DDM.&lt;/P&gt;&lt;P&gt;That said we just went through a whole exercise changing security filters to use ID ( int ) fields instead of name ( string ) fields because we saw a fairly huge leap in performance due to the data types.&amp;nbsp; &amp;nbsp; So there's that.&lt;/P&gt;&lt;P&gt;As for the errors I run between bemused and enraged at Incorta error messages so I can't be of any help there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/3"&gt;@JoeM&lt;/a&gt;&amp;nbsp; - can you share any further insight about the impact or lack of impact on performance when defining keys?&amp;nbsp; &amp;nbsp;&amp;nbsp;Or tag someone - I don't expect you to do *everything*&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 14:05:10 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5140#M399</guid>
      <dc:creator>RADSr</dc:creator>
      <dc:date>2023-10-12T14:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5141#M400</link>
      <description>&lt;P&gt;Thanks for chiming in&amp;nbsp;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/24"&gt;@RADSr&lt;/a&gt;&amp;nbsp;. Tagging&amp;nbsp;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/82"&gt;@mhelmy&lt;/a&gt;&amp;nbsp;who could give more insight on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 16:33:02 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5141#M400</guid>
      <dc:creator>JoeM</dc:creator>
      <dc:date>2023-10-12T16:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5143#M401</link>
      <description>&lt;P&gt;As mentioned by &lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/24"&gt;@RADSr&lt;/a&gt;, primary keys are crucial for ensuring the uniqueness of each row identifier in a table. They are particularly important for Incorta during the incremental data loading and deduplication process.&lt;/P&gt;
&lt;P&gt;Previously, Incorta used to perform deduplication during both full and incremental loading jobs for tables. However, to optimize the load process, we stopped deduplicating data during full loads by default because most data sources already apply primary key constraints. Nevertheless, we require our clients to enforce the primary key constraint for data sources that don't enforce it.&lt;/P&gt;
&lt;P&gt;Specific data sources, especially those storing data in a staging area with batches that might contain duplicates, necessitate enabling this flag to perform the deduplication during the full load and the incremental load. We encountered cases where customers didn't enforce the deduplication process during full loads for such data sources. Hence, we introduced this check to ensure the accuracy of join calculations.&lt;BR /&gt;Also, the logic of some MVs might return duplicates, which is why it is common to see issues like this with the MVs with keys identified after the upgrade. Enabling the flag (Enforce Primary Key Constraint) and then applying the loading from staging would fix the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 17:13:56 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5143#M401</guid>
      <dc:creator>mhelmy</dc:creator>
      <dc:date>2023-10-12T17:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5144#M402</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/82"&gt;@mhelmy&lt;/a&gt;&amp;nbsp; - and just to confirm, there's no query performance hit/gain associated with the key designation?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 18:41:02 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5144#M402</guid>
      <dc:creator>RADSr</dc:creator>
      <dc:date>2023-10-12T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why are primary keys important?</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5168#M407</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/24"&gt;@RADSr&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Having keys on tables introduces additional steps during the load process. However, they are necessary for the deduplication step. As for query performance, keys do not have an impact.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 15:45:35 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/why-are-primary-keys-important/m-p/5168#M407</guid>
      <dc:creator>mhelmy</dc:creator>
      <dc:date>2023-10-19T15:45:35Z</dc:date>
    </item>
  </channel>
</rss>

