<?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: Peek max date for incremental load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843604#M654107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do I see an apostrophe in front of peek?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 13:12:51 GMT</pubDate>
    <dc:creator>m_woolf</dc:creator>
    <dc:date>2015-06-17T13:12:51Z</dc:date>
    <item>
      <title>Peek max date for incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843603#M654106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;im trying to start an incremental load based in timestamps.&lt;/P&gt;&lt;P&gt;BUT the creation of a variable with which i want to limit the load does not work.&lt;/P&gt;&lt;P&gt;let vMAXTIMEms= 'peek(time_mill,-1,data_table) ;&lt;/P&gt;&lt;P&gt;seems to be completely ignored by the qlikview script (no syntax error on that line).&lt;BR /&gt;at the line where the variable should be used, i get an error. what is wrong ? Maybe some problems with peek and the variable ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14345397933324384" jivemacro_uid="_14345397933324384" modifiedtitle="true"&gt;
&lt;P&gt;data_table:&lt;/P&gt;
&lt;P&gt;LOAD &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source_ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source_TYPE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_RES,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_mill,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNIT,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE&lt;/P&gt;
&lt;P&gt;FROM ./QV_VALUES.qvd&lt;/P&gt;
&lt;P&gt;WHERE time_RES = 'DAY'&lt;/P&gt;
&lt;P&gt;AND&amp;nbsp;&amp;nbsp; source_TYPE = 'A'&lt;/P&gt;
&lt;P&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The plan is to follow these steps in the script&lt;BR /&gt;1. load the old data from qvd to get the date of the last entry. To speed this up, only the timestamp field is loaded&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14345399358705978" jivemacro_uid="_14345399358705978" modifiedtitle="true"&gt;
&lt;P&gt;data_table:&lt;/P&gt;
&lt;P&gt;LOAD &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_mill&lt;/P&gt;
&lt;P&gt;FROM ./QV_VALUES.qvd&lt;/P&gt;
&lt;P&gt;WHERE time_RES = 'DAY'&lt;/P&gt;
&lt;P&gt;AND&amp;nbsp;&amp;nbsp; source_TYPE = 'A'&lt;/P&gt;
&lt;P&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. write the max(timestamp) in a Variable vMAX_mill&lt;/P&gt;&lt;P&gt;let vMAXTIMEms= 'peek(time_mill,-1,data_table) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. use $(vMAXTIMEms)&amp;gt;=time_mill &lt;BR /&gt;in the incremental part of the loadscript&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843603#M654106</guid>
      <dc:creator />
      <dc:date>2015-06-17T13:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Peek max date for incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843604#M654107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do I see an apostrophe in front of peek?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843604#M654107</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-06-17T13:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Peek max date for incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843605#M654108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed - there should be no apostrophe there, but there should be quotes here:&lt;/P&gt;&lt;P&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;Let vMAXTIMEms = Num(peek('time_mill',-1,'data_table'));&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;This assumes that the qvd load is sorted by time_mill. i would also ensure that it is a number with Num(). Otherwise you should do this:&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;temp:&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;LOAD max(time_mill) As maxTime&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;From .... (qvd);&amp;nbsp; // or resident....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Let vMAXTIMEms = Num(peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;maxTime&lt;/SPAN&gt;'));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DROP Table temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-max-date-for-incremental-load/m-p/843605#M654108</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-06-17T13:24:11Z</dc:date>
    </item>
  </channel>
</rss>

