<?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 Synthetic key fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27651#M775332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using 2 tables where there's the description of product codes (Table: PRODUIT and Table SOUS_PRODUIT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QLikview is generating a loop when I use the key fields CODEMP and CODESMP but not CODPROD and CODSPROD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help to add the CODESMP in the Synthetic key fields list between the system table and the TRANSFERT_AVEC_REDRESS_M table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or help me to remove the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Abdallah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>absekrafi</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27651#M775332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using 2 tables where there's the description of product codes (Table: PRODUIT and Table SOUS_PRODUIT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QLikview is generating a loop when I use the key fields CODEMP and CODESMP but not CODPROD and CODSPROD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help to add the CODESMP in the Synthetic key fields list between the system table and the TRANSFERT_AVEC_REDRESS_M table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or help me to remove the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Abdallah&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/Synthetic-key-fields/m-p/27651#M775332</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27652#M775333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Abdallah,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Please find the attached updated sheet .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;you can join all the tables by avoiding multiple aliases as a key fields among the tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27652#M775333</guid>
      <dc:creator>tulabandula</dc:creator>
      <dc:date>2018-04-27T14:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27653#M775334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a couple of options, either don't load the duplicate fields, just load in your main table or Alias the duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field as NewField.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Past that depending on your business case you may want to have a look at building a link table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27653#M775334</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2018-04-27T14:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27654#M775335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't load the duplicate fields (CODEMP and CODESMP): the circular referce is removed, but an other question arises: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The 2 fields disappeared completely from the Table TRANSFERT_AVEC_REDRESS_M and &lt;SPAN style="font-size: 13.3333px;"&gt;in my final application I will use these two codes in charts and pivot tables so I still need them.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;In regards to the Link Table, (I am new to Qlikview), I don't know how to remove the system table (in the middle: it's created automaticly by qlikview).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Note: The synthetic Table is ($Syn 18 Table) in the picture I've sent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you again&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27654#M775335</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-04-27T15:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27655#M775336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreeni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to find the attached sheet. Where I can find it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Abdallah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:34:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27655#M775336</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-04-27T15:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic key fields</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27656#M775337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 style="margin: 0.1em 0 0.6em; font-weight: 500; font-size: 24px; font-family: Oswald, Arial, sans-serif; color: #333333;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #333399;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Hi,&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #333399;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;H3 style="margin: 0.1em 0 0.6em; font-weight: 500; font-size: 24px; font-family: Oswald, Arial, sans-serif; color: #333333;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #333399;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;What are Synthetic Keys or Tables?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;P style="margin: 0 0 21px; font-size: 16px; font-family: Raleway, Arial, sans-serif; color: #080e14; text-align: justify;"&gt;When we load two tables with a common field name in both tables, the tables get associated automatically based on the common fields. This is the associative functionality of QlikView.&lt;/P&gt;&lt;P style="margin: 0 0 21px; font-size: 16px; font-family: Raleway, Arial, sans-serif; color: #080e14; text-align: justify;"&gt;However, when we have more than one common field between two or more tables, QlikView creates “SYNTHETIC KEYS” and “SYNTHETIC TABLE”. QlikView adds synthetic table (as $Syn table) and synthetic key (as $Syn symbol) to the data model. The keys are added to the user uploaded tables and are used to join with synthetic table.&lt;/P&gt;&lt;P style="margin: 0 0 21px; font-size: 16px; font-family: Raleway, Arial, sans-serif; color: #080e14; text-align: justify;"&gt;Synthetic key is QlikView’s method to deal with composite keys. The Synthetic table contains a synthetic key that is a composite of all the combinations of the multiple key fields connecting the tables. In our data model, we had two fields common “Branch” and “Region” so QlikView created synthetic key and synthetic table on its own. If we look at the source table view of table viewer, it shows that two fields are connected between these two tables.&lt;/P&gt;&lt;P style="margin: 0 0 21px; font-size: 16px; font-family: Raleway, Arial, sans-serif; color: #080e14; text-align: justify;"&gt;&lt;/P&gt;&lt;H3 style="margin: 0.1em 0 0.6em; font-weight: 500; font-size: 24px; font-family: Oswald, Arial, sans-serif; color: #333333;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #333399;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;How to remove Synthetic keys?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;P style="margin: 0 0 21px; font-size: 16px; font-family: Raleway, Arial, sans-serif; color: #080e14;"&gt;To remove synthetic keys, we first look at our data model and make necessary changes, if required. We have multiple methods to remove synthetic keys but it depends upon the requirement&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Removing fields:&lt;/STRONG&gt; When common fields causing synthetic keys are not required in data model and doing so will not affect the relationship between two tables. Removing fields can be done by commenting or removing field from load script.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Renaming fields (Using QUALIFY):&lt;/STRONG&gt; When common fields causing synthetic keys are not&amp;nbsp; same field (not containing similar values), These are actually different fields with same name. Renaming can be done by using “AS” clause. We can also achieve this by using QUALIFY statement. With qualified statement, fields names are converted in the “TableName.FieldName” format&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #080e14; font-size: 16px; font-style: inherit; font-family: Raleway, Arial, sans-serif; margin: 0 0 21px; font-weight: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt; Using QUALIFY&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Autonumber/ Composite Keys:&lt;/STRONG&gt; When we know common fields causing synthetic keys are important for data model then we can create our own key to handle composite keys. We can also use Autonumber / Autonumberhash128 / Autonumberhash256 functions to create composite keys. These will create a unique bit value for each distinct combination of the concatenated columns. Autonumberhash128 and Autonumberhash256 creates 128bit and 256bit values respectively. Please note Autonumber may be problematic in applications generating the QVD files for use in other QlikView application&lt;/LI&gt;&lt;LI&gt;We also have other methods to remove synthetic keys like “&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Creating a link table&lt;/STRONG&gt;“, “&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Creating Explicit Joins&lt;/STRONG&gt; ” and “&lt;STRONG style="font-style: inherit; font-family: inherit; color: #333333;"&gt;Concatenating similar tables&lt;/STRONG&gt;“. &lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-key-fields/m-p/27656#M775337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-27T19:01:17Z</dc:date>
    </item>
  </channel>
</rss>

