<?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 Create a composite Key In qlik Compose. in Qlik Compose</title>
    <link>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2001368#M794</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I came across a scenario to create a composite key in compose&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;&lt;SPAN&gt;eg:&amp;nbsp; &amp;nbsp; &amp;nbsp;Key1 &amp;amp; '~' &amp;amp; Key2 AS Key1key2.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there a effective way in compose to create this kind of key?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;#qlikcompose, #compositekey&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2025 20:49:07 GMT</pubDate>
    <dc:creator>hsardar</dc:creator>
    <dc:date>2025-03-14T20:49:07Z</dc:date>
    <item>
      <title>Create a composite Key In qlik Compose.</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2001368#M794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I came across a scenario to create a composite key in compose&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;&lt;SPAN&gt;eg:&amp;nbsp; &amp;nbsp; &amp;nbsp;Key1 &amp;amp; '~' &amp;amp; Key2 AS Key1key2.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there a effective way in compose to create this kind of key?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;#qlikcompose, #compositekey&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 20:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2001368#M794</guid>
      <dc:creator>hsardar</dc:creator>
      <dc:date>2025-03-14T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a composite Key In qlik Compose.</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2003188#M798</link>
      <description>&lt;P&gt;See my reply in your post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Compose-for-Data-Warehouses/Compose-Modelling/td-p/2001372" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Compose-for-Data-Warehouses/Compose-Modelling/td-p/2001372&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 16:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2003188#M798</guid>
      <dc:creator>Pierre_G</dc:creator>
      <dc:date>2022-11-10T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create a composite Key In qlik Compose.</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2008413#M830</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/156298"&gt;@hsardar&lt;/a&gt; yes, you should be able to get the key you are asking for in Compose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a new attribute in the model for the composite key you want to build., and validate the model. Then in the DWH, you build an expression for this new composite key using CONCAT operation. You can then decide if you like to keep the original keys.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;The table, 'order details' has 2 PKs, ProductID and OrderId. So in the model, the 'order details' table will look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nanda_Ravindra_0-1669227622437.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/94490i1A9EDE89D02E1474/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nanda_Ravindra_0-1669227622437.png" alt="Nanda_Ravindra_0-1669227622437.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Add the new attribute for the composite key in the model and remove the existing PKs from the 'order details table'. Your model will look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nanda_Ravindra_1-1669227861089.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/94491i278FDB3DE92050E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nanda_Ravindra_1-1669227861089.png" alt="Nanda_Ravindra_1-1669227861089.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Validate the model&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. In the DWH mapping use this expression for the new composite key, OrderId_product_Id'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;CONCAT(${OrderId}, '&amp;amp;', ${ProductID})&lt;/P&gt;
&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nanda_Ravindra_2-1669228126240.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/94492iC5AEB2F38874CB77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nanda_Ravindra_2-1669228126240.png" alt="Nanda_Ravindra_2-1669228126240.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Validate the DWH and generate the instructions.&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;If you have questions or need help, please open a case with support and we should be able to walk you thru the steps.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Nanda&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 18:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Create-a-composite-Key-In-qlik-Compose/m-p/2008413#M830</guid>
      <dc:creator>Nanda_Ravindra</dc:creator>
      <dc:date>2022-11-23T18:34:23Z</dc:date>
    </item>
  </channel>
</rss>

