<?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: flat table structur to star schema in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615543#M479377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Theoretically yes - and don't forget it will take more time in the script with the lookups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine that after a certain point though, the more information you need in a lookup (eg if your customer lookup needs many more fields eg tel number or address) then it may be optimal to put it in a lookup rather than the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this interesting article (again, by the fab Henric) where he disproves the myth that counting distinct is slower than summing on a count within a lookup table, gives more of a feel for the issues we get with putting things into separate tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2014 12:39:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-06T12:39:16Z</dc:date>
    <item>
      <title>flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615539#M479373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanna know what the best practices is to make a star schema in qlikview when your start point is one big flat table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg I have this table loaded into qlikview:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENTRYID,CreateDate,ShopID,ShopName,CustomerID,CustomerName,Amount,Taxes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When is the best practices to split this up in Dimensions and facts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say i want to create a ShopDimension And a CustomerDimension and a DateDimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would i then resident load from the big table and just make a surrogate key? Or what do you mean is the best?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615539#M479373</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615540#M479374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, your flat table structure might work better than star schema in QlikView. Qlikview, when it creates the tables in its memory via the script actually stores information in each table as bits and lookups - this is one of the ways it can reduce the size of the data. See this article here for more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/11/20/symbol-tables-and-bit-stuffed-pointers"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2012/11/20/symbol-tables-and-bit-stuffed-pointers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating an id code and a lookup for an text field may actually use more memory than just leaving the text field in as QV has to create a "lookup" for the text, and then an additional "lookup" for the Code rather than just the one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because of this, often calculations work quicker if the components are all in the same table, rather reaching across lookup tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However obviously this depends on the rest of the data loaded, if you want to add more information to the lookups etc then this might not be the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After loading in the big table, you can create a lookup by loading resident from it, and using DISTINCT to get the distinct values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LookupTable: Load distinct ShopID,ShopName resident BigTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be quicker than loading from source, as Qlikview will already have it in its memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615540#M479374</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615541#M479375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the inputs. I see your points and i will try it out &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But basically qlikview loads faster cause it can compress the data in the memory and lookup tables will be more memory consuming due to the lookups?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615541#M479375</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615542#M479376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to mention that looping through the values of the field using fieldvalue () is even quicker than loading distinct, but I'm not sure how that would work when you&amp;nbsp; need two distinct&amp;nbsp; values. The way I use it (for one field) is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lu_Field:&lt;/P&gt;&lt;P&gt;Load fieldvalue('FieldName',iterno()) as distinct_FieldName&lt;/P&gt;&lt;P&gt;Autogenerate 1&lt;/P&gt;&lt;P&gt;while len(fieldValue('FieldName',iterno()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this returns the text value, that qlikview has stored in the field fieldname for value number iterno()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie for iterno() = 2 then it will return the second stored value (that it has already indexed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB the "len(...)" statement is important as it cuts the iterations when we have run out of values for fieldname!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:32:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615542#M479376</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615543#M479377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Theoretically yes - and don't forget it will take more time in the script with the lookups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine that after a certain point though, the more information you need in a lookup (eg if your customer lookup needs many more fields eg tel number or address) then it may be optimal to put it in a lookup rather than the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this interesting article (again, by the fab Henric) where he disproves the myth that counting distinct is slower than summing on a count within a lookup table, gives more of a feel for the issues we get with putting things into separate tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615543#M479377</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615544#M479378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Erica, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will look into this and try to test some different things. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When working with Cubes and reporting services a star schema is the best practice solution in my way - But Qlikview handles data differently, so im absolutely willing to try other methods. Ill have it a maybe return if i have some questions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615544#M479378</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615545#M479379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I subscribe to Erica's first suggestion. Leave everything in this one big table, and your performance will be excellent because no associative links need to be traced. Dimensions will operate just the same, whether in a separate table or embedded in the Facts table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only one exception: you may want to create a Master Calendar for your CreateDate field, as there may be holes in that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is only a starting point, you were saying?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615545#M479379</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-02-06T12:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615546#M479380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it would - In my mind a star schema is just easier to read cause you have a datamodel that links to your fact with all your keys needed and thereby you have data connected &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615546#M479380</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615547#M479381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My table consists of 1.7 billions rows of transactions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My createdate should be my key to the my Mastercalendar (Maybe ill create a new key in the table without timestamp and so on) - What do you think the best solution would be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes this is only a start point. This one big table contains most of the data needed, but later on there can be a new table that might need to be joined on or something else. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615547#M479381</guid>
      <dc:creator />
      <dc:date>2014-02-06T12:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615548#M479382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am used to working in SQL, so in my mind a star schema is intuitive to me. But QV works so different to a "traditional" database so these assumptions dont always hold!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615548#M479382</guid>
      <dc:creator />
      <dc:date>2014-02-06T13:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615549#M479383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Master calendars are great ideas and there is&amp;nbsp; alot of guidance on the community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check out the autonumber() functions when you are creating keys for this as this is a compact way to create a key in QV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615549#M479383</guid>
      <dc:creator />
      <dc:date>2014-02-06T13:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615550#M479384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - The calendar part i got covered &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ill sure have to look into how i do lookups and how i get the key in my "bigfacttable" instead of the real value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe a load of the big table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;distinct some values into a dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make lookup from dimension and big table and create a new "big table" and then drop the first 1 so that the new big table only consists of maybe values and keys. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615550#M479384</guid>
      <dc:creator />
      <dc:date>2014-02-06T13:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615551#M479385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure that your end-users still say hello to you in the morning, consider choosing from the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Aggregate whatever can be aggregated, and drop the historical records that nobody needs, or&lt;/LI&gt;&lt;LI&gt;Take an opportunistic view to the data model, and use whatever gives you acceptable performance. For instance, do a comparison by testing a single table-model against a multiple table model with say 10 mio rows.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, a standard Master Calendar can be built and coupled to the transaction table by loading Floor([CreateDate]) AS CreateDate. If the design doesn't need a day level calendar, reduce granularity to YearMonth or YearQuarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615551#M479385</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-02-06T13:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: flat table structur to star schema</title>
      <link>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615552#M479386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha - We have discussed level of aggregation and sadly we need every thing on transactionlevel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But good idea to try and split the data into large segments to see whether it would perform better. Maybe even split it out to serverel qvw documents? and then combine it into a qvd load. However i only need to do full load once, the rest can be incremental load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/flat-table-structur-to-star-schema/m-p/615552#M479386</guid>
      <dc:creator />
      <dc:date>2014-02-06T13:25:49Z</dc:date>
    </item>
  </channel>
</rss>

