<?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: Generic Load is creating duplicate records in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894631#M73803</link>
    <description>&lt;P&gt;Yes Canerkan, my data has duplicates that is causing the problem. There is no problem with generic load.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 06:26:46 GMT</pubDate>
    <dc:creator>Prabhu</dc:creator>
    <dc:date>2022-02-18T06:26:46Z</dc:date>
    <item>
      <title>Generic Load is creating duplicate records, how to overcome this in Qlik Sense?</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1893623#M73693</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am trying to create a generic load with the below-given script.&amp;nbsp; But the output table(Unique) is having duplicate records. Actually, it should have unique records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SchemaData:
LOAD distinct
"Case ID",
taskName,
taskStatus,
SchemaAge,
SchemaStartTimestamp,
SchemaAgeAtTimestamp
FROM [lib://BOB/qvd/SchemaData.qvd]
(qvd);


Unique:
LOAD Distinct
"Case ID"
RESIDENT SchemaData;

task:
GENERIC LOAD "Case ID", taskName &amp;amp;':Task Status', taskStatus
RESIDENT SchemaData;

drop table SchemaData;


FOR i = NoOfTables()-1 to 0 STEP -1
LET vTable=TableName($(i));
IF WildMatch('$(vTable)', 'task*') THEN
LEFT JOIN (Unique) LOAD * RESIDENT [$(vTable)];
DROP TABLE [$(vTable)];
ENDIF
NEXT i

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/894"&gt;@Saravanan_Desingh&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50135"&gt;@vamsee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 13:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1893623#M73693</guid>
      <dc:creator>Prabhu</dc:creator>
      <dc:date>2022-11-03T13:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Load is creating duplicate records</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894265#M73763</link>
      <description>&lt;P&gt;Hi Prabhu,&lt;/P&gt;
&lt;P&gt;maybe try this change in your Script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SchemaData:&lt;BR /&gt;LOAD distinct&lt;BR /&gt;"Case ID",&lt;BR /&gt;taskName,&lt;BR /&gt;taskStatus,&lt;BR /&gt;SchemaAge,&lt;BR /&gt;SchemaStartTimestamp,&lt;BR /&gt;SchemaAgeAtTimestamp&lt;BR /&gt;FROM [lib://BOB/qvd/SchemaData.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Unique:&lt;BR /&gt;LOAD Distinct&lt;BR /&gt;"Case ID"&lt;BR /&gt;RESIDENT SchemaData;&lt;/P&gt;
&lt;P&gt;task:&lt;BR /&gt;GENERIC LOAD "Case ID", taskName &amp;amp;':Task Status', taskStatus&lt;BR /&gt;RESIDENT SchemaData;&lt;/P&gt;
&lt;P&gt;drop table SchemaData;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;FOR i = NoOfTables()-1 to 0 STEP -1&lt;BR /&gt;LET vTable=TableName($(i));&lt;BR /&gt;&lt;STRONG&gt;if SubField(vTable,'.',1) = 'task' THEN&lt;/STRONG&gt;&lt;BR /&gt;LEFT JOIN (Unique) LOAD * RESIDENT [$(vTable)];&lt;BR /&gt;DROP TABLE [$(vTable)];&lt;BR /&gt;ENDIF&lt;BR /&gt;NEXT i&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe there are Tables with Names that also contain the word 'task*' and are therfore joined without being part of the generic load.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if it helped.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Can.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 11:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894265#M73763</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2022-02-17T11:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Load is creating duplicate records</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894301#M73769</link>
      <description>Hi  canerkan,&lt;BR /&gt;Thanks for the update. But it's not working. I am still getting duplicate&lt;BR /&gt;records.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Feb 2022 13:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894301#M73769</guid>
      <dc:creator>Prabhu</dc:creator>
      <dc:date>2022-02-17T13:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Load is creating duplicate records</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894337#M73774</link>
      <description>&lt;P&gt;Please check if there are any duplicates in the Table you are using for your generic load. It could be a Data Quality Issue.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 06:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894337#M73774</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2022-11-03T06:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Load is creating duplicate records</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894631#M73803</link>
      <description>&lt;P&gt;Yes Canerkan, my data has duplicates that is causing the problem. There is no problem with generic load.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 06:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-is-creating-duplicate-records-how-to-overcome-this/m-p/1894631#M73803</guid>
      <dc:creator>Prabhu</dc:creator>
      <dc:date>2022-02-18T06:26:46Z</dc:date>
    </item>
  </channel>
</rss>

