<?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: What is Synthetic key. And how to avoid it? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93591#M762308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you get any error, please provide screen or sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2018 04:17:15 GMT</pubDate>
    <dc:creator>qlikviewwizard</dc:creator>
    <dc:date>2018-08-03T04:17:15Z</dc:date>
    <item>
      <title>What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93585#M762302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I got an error message to re-lode my tables in Qlikview file.&lt;/P&gt;&lt;P&gt;please help &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93585#M762302</guid>
      <dc:creator>arethaking</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93586#M762303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aretha , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow this link , it has detailed explanation of Synthetic keys and how to handle them .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93586#M762303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-01T12:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93587#M762304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;forgot to attach the link .. here it is &lt;A href="https://www.analyticsvidhya.com/blog/2014/11/synthetic-keys-qlikview-simplified/" title="https://www.analyticsvidhya.com/blog/2014/11/synthetic-keys-qlikview-simplified/"&gt;https://www.analyticsvidhya.com/blog/2014/11/synthetic-keys-qlikview-simplified/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93587#M762304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-01T12:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93588#M762305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question is not full filled?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93588#M762305</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-08-01T12:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93589#M762306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You can find more info about Synthetic keys in the QlikView manual.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The concept is, when you join two tables, it can be done based on primary key and foreign key relationship based on a particular column. We can treat it as a normal join between the two tables. The problem starts when the joining is on more than one columns.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The synthetic key scenario is when you have same column name for more than one columns between the loaded tables (e.g. C1 &amp;amp; C2 is common between Table 1 &amp;amp; Table 2). QlikView internally relates those tables based on the common column names and create another internal table (synthetic table) with the matching columns and a synthetic key generated by all possible combined values of the matching columns (C1, C2 and Synthetic Key column....starts with '$'). The impact could be a datamodel with unncessery jumble as well as wastage of memory. e.g. think of two tables with millions of rows. If they have synthetic keys between them, that would generate another table, with large number of rows...and completely unnecessery...finally, eating up memory. And a 'not so well' designed datamodel can of course lead to performance impact in terms of time, as you know.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now, the question is, if you really want to get rid of the issue, how to fix it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1. Using QUALIFY&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This enforces QlikView to qualify all/selected fields. Qualify implements the check on full path of the field (e.g. Field is designated by Tablename.FieldName).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;e.g.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify *;&lt;BR /&gt;turns qualification on for all field names of the subsequent table(s).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify “*_Name”;&lt;BR /&gt;turns qualification on for all field names ending with _Name in the ssubsequent table(s).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify “Name_*”;&lt;BR /&gt;turns qualification on for all field names Starting with Name_ in the ssubsequent table(s).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify “Amt*”,Profit;&lt;BR /&gt;turns qualification on for Profit and all field names starting with Amt.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify S???;&lt;BR /&gt;turns qualification on for four character field names starting with S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Ofcourse you don't always need to qualify ALL the fields of a table. E.g. you have C1 &amp;amp; C2, two common columns between Table 1 &amp;amp; Table 2. C1 is used to join the 2 tables and C2 is the column that you think might create Syn Key. You will do something like:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify *;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Unqualify C1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Select * from Table1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Select * from Table2;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This will ensure that only C1 is used to join the two tables, eventually nullifying the possibility of Syn Key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2. Autonumber&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you need to concat the Syn Key candidate fields and create your own key, you can use Autonumber/Autonumberhash128/Autonumberhash256 function. This will create a unique integer value for each distinct combination of the concateneted columns. Autonumberhash128 and Autonumberhash256 creates 128bit and 256bit values respectively.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;E.g. In the previous example, autonumber(C1&amp;amp;C2) or autonumberhash128(C1,C2) or autonumberhash256(C1,C2) will create the necessery uniqueness.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;One word of cauton using Autonumber is, as they are system generated, you do not have any control over the values. And for external QVDs, since the range of unique autonumber values are limited, uniqueness is not guranted. the hash128 and hash256 functions particularly address this issue and widens the range to ensure uniqueness.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;3. Aliasing&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you alias the comflicting fields, i.e. the Syn Key candidate fields, they would be treated as different fields and will not be joined automatically by QV. This is a simple solution based on how flexible the requirements are, in renaming the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Ofcourse you will find many other examples in this forum/QV manual that will strenthen your concept. This is my understanding from my experience with QV. Please let me know if it answers your question on my post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93589#M762306</guid>
      <dc:creator>arvind1494</dc:creator>
      <dc:date>2018-08-01T12:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93590#M762307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Share your sample script, then it's possible to give an idea on that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 15:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93590#M762307</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-08-01T15:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: What is Synthetic key. And how to avoid it?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93591#M762308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you get any error, please provide screen or sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 04:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Synthetic-key-And-how-to-avoid-it/m-p/93591#M762308</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-08-03T04:17:15Z</dc:date>
    </item>
  </channel>
</rss>

