<?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 Correct method to load QVD and update YTD (&amp; combine with database extract) in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Correct-method-to-load-QVD-and-update-YTD-combine-with-database/m-p/968650#M1384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a data load script which calculates the Year-to-Date at load-time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF (DayNumberOfYear(InvoiceDate) &amp;lt;= DayNumberOfYear(Today())&amp;nbsp; THEN 'YTD' &lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;etc.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the load script is quite slow, loading many years of data.&amp;nbsp; I would like to load anything up to last year and save it in a QVD file and load it from disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But obviously the YTD calculation will change each day.&amp;nbsp; How do I arrange the load script to make it work correctly?&amp;nbsp; Will the QVD store the YTD flag &lt;STRONG&gt;at the time of saviing the file&lt;/STRONG&gt; or can it recalculate it after loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I do something like:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load QVD file&lt;/LI&gt;&lt;LI&gt;Load from Database&lt;/LI&gt;&lt;LI&gt;Join Tables (&lt;STRONG&gt;Insert Into?)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load QVD file&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;LI&gt;Load from Database&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;LI&gt;Join Tables (&lt;STRONG&gt;Insert Into&lt;/STRONG&gt;?)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And does it matter if I do it all in one long load module, or should I am to break it into multiple modules (or is that purely for presentation/readability?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(And, to add to the mix, I have a Master Calendar &amp;amp; Geographic attributes - where should I aim to join those to the loaded data?&amp;nbsp; At the moment (one load function, so one table) it works just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2015 09:11:28 GMT</pubDate>
    <dc:creator>quriouss</dc:creator>
    <dc:date>2015-08-21T09:11:28Z</dc:date>
    <item>
      <title>Correct method to load QVD and update YTD (&amp; combine with database extract)</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Correct-method-to-load-QVD-and-update-YTD-combine-with-database/m-p/968650#M1384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a data load script which calculates the Year-to-Date at load-time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF (DayNumberOfYear(InvoiceDate) &amp;lt;= DayNumberOfYear(Today())&amp;nbsp; THEN 'YTD' &lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;etc.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the load script is quite slow, loading many years of data.&amp;nbsp; I would like to load anything up to last year and save it in a QVD file and load it from disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But obviously the YTD calculation will change each day.&amp;nbsp; How do I arrange the load script to make it work correctly?&amp;nbsp; Will the QVD store the YTD flag &lt;STRONG&gt;at the time of saviing the file&lt;/STRONG&gt; or can it recalculate it after loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I do something like:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load QVD file&lt;/LI&gt;&lt;LI&gt;Load from Database&lt;/LI&gt;&lt;LI&gt;Join Tables (&lt;STRONG&gt;Insert Into?)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load QVD file&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;LI&gt;Load from Database&lt;/LI&gt;&lt;LI&gt;Apply Calculations&lt;/LI&gt;&lt;LI&gt;Join Tables (&lt;STRONG&gt;Insert Into&lt;/STRONG&gt;?)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And does it matter if I do it all in one long load module, or should I am to break it into multiple modules (or is that purely for presentation/readability?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(And, to add to the mix, I have a Master Calendar &amp;amp; Geographic attributes - where should I aim to join those to the loaded data?&amp;nbsp; At the moment (one load function, so one table) it works just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 09:11:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Correct-method-to-load-QVD-and-update-YTD-combine-with-database/m-p/968650#M1384</guid>
      <dc:creator>quriouss</dc:creator>
      <dc:date>2015-08-21T09:11:28Z</dc:date>
    </item>
  </channel>
</rss>

