<?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: ETL task aborted - Unexpected Primary Key violations detected in Qlik Compose</title>
    <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850194#M417</link>
    <description>&lt;P&gt;Do you have the Handle Duplicates checkbox selected?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 15:33:29 GMT</pubDate>
    <dc:creator>jtompkins</dc:creator>
    <dc:date>2021-10-21T15:33:29Z</dc:date>
    <item>
      <title>ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850052#M416</link>
      <description>&lt;P&gt;Greetings.&lt;/P&gt;
&lt;P&gt;I have two tables in DWH - a directory and a fact table with one business key referencing the directory.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vtatarnikov_0-1634816314195.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64923i46BE59FD2641BA0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vtatarnikov_0-1634816314195.png" alt="vtatarnikov_0-1634816314195.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Accordingly, there are two mappings - for filling the directory and the fact table.&lt;/P&gt;
&lt;P&gt;Why am I getting this error when running mappings?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vtatarnikov_1-1634816456161.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64927i5A375A5B6315D476/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vtatarnikov_1-1634816456161.png" alt="vtatarnikov_1-1634816456161.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried to form the directory from the fact table, the result is the same.&lt;/P&gt;
&lt;P&gt;Even if we assume that the business key in the fact table refers to a missing key in the reference, then the loading task should be completed.&lt;/P&gt;
&lt;P&gt;What's the matter here?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 20:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850052#M416</guid>
      <dc:creator>vtatarnikov</dc:creator>
      <dc:date>2025-03-14T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850194#M417</link>
      <description>&lt;P&gt;Do you have the Handle Duplicates checkbox selected?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850194#M417</guid>
      <dc:creator>jtompkins</dc:creator>
      <dc:date>2021-10-21T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850202#M418</link>
      <description>&lt;P&gt;Compose will automatically detect if there are duplicate KEYS (aka the business key defined in the model) within the data set that it is processing.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;During a FULL LOAD - we do not expect to get duplicate business keys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;During CDC processing, we may get duplicates (multiple updates to a single source record) - and thus you should enable "Handle Duplicates" for CDC processing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;YOu could enable (as &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103870"&gt;@jtompkins&lt;/a&gt;&amp;nbsp; suggests) "Handle Duplicates" for the "ACCOUNT" table load.&amp;nbsp; Note that when you do this, Compose will pick 1 record to load the target for each business key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial question (looking at the model diagram) - do you have the "TRADING" source table actually mapped to the "ACCOUNT" entity?&amp;nbsp; &amp;nbsp;(Is this a degenerative process where you want to select a DISTINCT set of values from "TRADING" to populate the "ACCOUNT" table?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you not have a true source for "ACCOUNT" ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the "TRADING" table has multiple values for the attributes in ACCOUNT - do you care which one is selected by de-duplication ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850202#M418</guid>
      <dc:creator>TimGarrod</dc:creator>
      <dc:date>2021-10-21T15:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850215#M419</link>
      <description>&lt;P&gt;The ID account is not unique in the fact table, however it is the only business key in the fact table.&lt;/P&gt;
&lt;P&gt;Does the fact table need to have a key that uniquely identifies each row?&lt;/P&gt;
&lt;P&gt;If so, then this is the case. So I have to create a composite key from several keys.&lt;/P&gt;
&lt;P&gt;Right?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850215#M419</guid>
      <dc:creator>vtatarnikov</dc:creator>
      <dc:date>2021-10-21T15:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850218#M420</link>
      <description>&lt;P&gt;Correct - I misunderstood (and thought the account table load was failing).&amp;nbsp; &amp;nbsp;In a Compose model, each table needs to have a business&amp;nbsp; / natural key defined.&amp;nbsp; This can be simple or a composite key.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compose uses this key to determine if the incoming data is new or a change (and then processes the data according to the model characteristics - Type1 / Type2 attributes).&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:52:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850218#M420</guid>
      <dc:creator>TimGarrod</dc:creator>
      <dc:date>2021-10-21T15:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: ETL task aborted - Unexpected Primary Key violations detected</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850495#M422</link>
      <description>&lt;P&gt;Thanks it works&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 07:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/ETL-task-aborted-Unexpected-Primary-Key-violations-detected/m-p/1850495#M422</guid>
      <dc:creator>vtatarnikov</dc:creator>
      <dc:date>2021-10-22T07:35:54Z</dc:date>
    </item>
  </channel>
</rss>

