<?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 ETL question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ETL-question/m-p/164437#M37131</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 have a requirement like this. I have a product table with SKU and 5 other attributes like type, category,etc.&lt;/P&gt;&lt;P&gt;I have costs for products in a separate data file which can contain any combination of the 5 attributes and a cost associated.&lt;/P&gt;&lt;P&gt;I need to map the combination of columns in the data file to the attributes in the Product table and allocate the costs to each SKU.&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;Lets assume my product table is like this (Already loaded into qvw)&lt;/P&gt;&lt;P&gt;SKU Category Type Brand&lt;/P&gt;&lt;P&gt;A Category1 Type1 Brand1&lt;/P&gt;&lt;P&gt;B Category1 Type2 Brand2&lt;/P&gt;&lt;P&gt;C Category2 Type3 Brand3&lt;/P&gt;&lt;P&gt;D Category2 Type3 Brand4&lt;/P&gt;&lt;P&gt;Now my Data file contains&lt;/P&gt;&lt;P&gt;Category Type Brand Cost&lt;/P&gt;&lt;P&gt;Category1 Type1 NULL $200&lt;/P&gt;&lt;P&gt;Category1 NULL Brand2 $100&lt;/P&gt;&lt;P&gt;Category2 Type3 NULL $150&lt;/P&gt;&lt;P&gt;My final table should contain this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKU Category Type Brand Cost&lt;/P&gt;&lt;P&gt;A Category1 Type1 Brand1 $200&lt;/P&gt;&lt;P&gt;B Category1 Type2 Brand2 $100&lt;/P&gt;&lt;P&gt;C Category2 Type3 Brand3 $150&lt;/P&gt;&lt;P&gt;D Category2 Type3 Brand4 $150&lt;/P&gt;&lt;P&gt;This is a tricky requirement and I am pretty new to building an ETL in QV. I have not really used dynamic queries or joins so far so any ideas which will help me solve this problem will be appreciated.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Mar 2010 10:15:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-03-02T10:15:15Z</dc:date>
    <item>
      <title>ETL question</title>
      <link>https://community.qlik.com/t5/QlikView/ETL-question/m-p/164437#M37131</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 have a requirement like this. I have a product table with SKU and 5 other attributes like type, category,etc.&lt;/P&gt;&lt;P&gt;I have costs for products in a separate data file which can contain any combination of the 5 attributes and a cost associated.&lt;/P&gt;&lt;P&gt;I need to map the combination of columns in the data file to the attributes in the Product table and allocate the costs to each SKU.&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;Lets assume my product table is like this (Already loaded into qvw)&lt;/P&gt;&lt;P&gt;SKU Category Type Brand&lt;/P&gt;&lt;P&gt;A Category1 Type1 Brand1&lt;/P&gt;&lt;P&gt;B Category1 Type2 Brand2&lt;/P&gt;&lt;P&gt;C Category2 Type3 Brand3&lt;/P&gt;&lt;P&gt;D Category2 Type3 Brand4&lt;/P&gt;&lt;P&gt;Now my Data file contains&lt;/P&gt;&lt;P&gt;Category Type Brand Cost&lt;/P&gt;&lt;P&gt;Category1 Type1 NULL $200&lt;/P&gt;&lt;P&gt;Category1 NULL Brand2 $100&lt;/P&gt;&lt;P&gt;Category2 Type3 NULL $150&lt;/P&gt;&lt;P&gt;My final table should contain this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKU Category Type Brand Cost&lt;/P&gt;&lt;P&gt;A Category1 Type1 Brand1 $200&lt;/P&gt;&lt;P&gt;B Category1 Type2 Brand2 $100&lt;/P&gt;&lt;P&gt;C Category2 Type3 Brand3 $150&lt;/P&gt;&lt;P&gt;D Category2 Type3 Brand4 $150&lt;/P&gt;&lt;P&gt;This is a tricky requirement and I am pretty new to building an ETL in QV. I have not really used dynamic queries or joins so far so any ideas which will help me solve this problem will be appreciated.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 10:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ETL-question/m-p/164437#M37131</guid>
      <dc:creator />
      <dc:date>2010-03-02T10:15:15Z</dc:date>
    </item>
    <item>
      <title>ETL question</title>
      <link>https://community.qlik.com/t5/QlikView/ETL-question/m-p/164438#M37132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hej Arun&lt;/P&gt;&lt;P&gt;I would use a few joins to link the Cost field to either Type or Brand in your product table. I cannot see whether Type and Brand are mutually exclusive ie if you have Type, the Brand field will be NULL and vice versa. If they are mutually exclusive, then you can join the data to the product table by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;JOIN (Product)&lt;BR /&gt;LOAD&lt;BR /&gt;Type&lt;BR /&gt;Cost&lt;BR /&gt;RESIDENT Data;&lt;BR /&gt;JOIN (Product)&lt;BR /&gt;LOAD&lt;BR /&gt;Brand&lt;BR /&gt;Cost&lt;BR /&gt;RESIDENT Data;&lt;BR /&gt;DROP TABLE Data;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I havent tried the code yet so you prob need to test this. The end result should be your Product Table would have a new Cost field.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 11:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ETL-question/m-p/164438#M37132</guid>
      <dc:creator />
      <dc:date>2010-03-02T11:01:14Z</dc:date>
    </item>
  </channel>
</rss>

