<?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: Incremental Load of New Files Only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865070#M654589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may consider moving the files to a different folder after loading and storing to your QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a loop of the files and only load the newest files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P class="Code"&gt;FOR Each File in filelist (Root&amp;amp;' \*.' &amp;amp;Ext)&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Let vCheck = ... // Parse the date from file name and compare to latest Date from QVD&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;IF vCheck THEN&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P class="Code"&gt;LOAD Field1,&lt;/P&gt;&lt;P class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P class="Code"&gt;FROM $(File);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;ENDIF&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;NEXT File&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 22:02:58 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-07-13T22:02:58Z</dc:date>
    <item>
      <title>Incremental Load of New Files Only</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865069#M654588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;To summarize, what is the way to perform an Incremental Load on a folder full of csv files without Loading the data against the 'Where" condition?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a folder with daily files going back 10 years+. To save time, I ran an initial load and Stored everything into a QVD file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moving forward, I would like to add data from only New files, but on an ad-hoc basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When running an Incremental Load, I do not want to open ALL files to match the "Where" statement. I've set an artificial variable limit (Year portion of the Last_Modified_Date 2015) with a wildcard into the file name, so the Load would only look into the current year. &lt;SPAN style="font-size: 13.3333330154419px;"&gt;This will be problematic at year-end. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I'm trying to overcome is that, say after 200 days, that is 200 files to load for a match to my Where statement. This takes quite a bit of time. Is there a &lt;SPAN style="font-size: 13.3333330154419px;"&gt;way to perform an Incremental Load on a folder full of CSV files without Loading the data against the 'Where" condition? &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File Names have have a date stamp in the file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a new QlikView user! A code example would help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 21:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865069#M654588</guid>
      <dc:creator />
      <dc:date>2015-07-13T21:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load of New Files Only</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865070#M654589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may consider moving the files to a different folder after loading and storing to your QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a loop of the files and only load the newest files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P class="Code"&gt;FOR Each File in filelist (Root&amp;amp;' \*.' &amp;amp;Ext)&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Let vCheck = ... // Parse the date from file name and compare to latest Date from QVD&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;IF vCheck THEN&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P class="Code"&gt;LOAD Field1,&lt;/P&gt;&lt;P class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P class="Code"&gt;FROM $(File);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;ENDIF&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;NEXT File&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865070#M654589</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-13T22:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load of New Files Only</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865071#M654590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a variable with the actual date for loan only the file of this date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vActualDate=today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\DATA\FILENAME_$(vActualDate).csv];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Table into ..\QVD\ActualQVD.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after that you can do a incremental load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Master:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\QVD\HistoricalQVD.qvd];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate(Master)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;[..\QVD\ActualQVD.qvd];&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Let me know if this help you.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Ger.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865071#M654590</guid>
      <dc:creator>ger_alegria</dc:creator>
      <dc:date>2015-07-13T22:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load of New Files Only</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865072#M654591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! I pursued &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌‌‌ second option. Script execution is significantly faster, but I must admit the script takes somewhat longer than I anticipated to pull the file names from my network drive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code for reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Loading Data from QVD &lt;/P&gt;&lt;P&gt;[DATA_TABLE]:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;FROM &lt;C&gt; (qvd);&lt;/C&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Find Last Modified Date&lt;/P&gt;&lt;P&gt;Last_Updated_Date:&lt;/P&gt;&lt;P&gt;LOAD Max(Modified_Date) as MaxDate&lt;/P&gt;&lt;P&gt;resident [DATA_TABLE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Store Last Modified Date to a Variable&lt;/P&gt;&lt;P&gt;LET Last_Updated_Date = peek('MaxDate',0,'Last_Updated_Date');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vStore='No';&lt;/P&gt;&lt;P&gt;FOR Each vFile in FileList('C:\ABC\TOR*.csv') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vfilenamedate = Date#(mid('$(vFile)',23,8), 'YYYYMMDD');&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF (vfilenamedate &amp;gt; Last_Updated_Date) then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vStore='Yes';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Concatenate&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD *&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; [$(vFile)]&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF;&lt;/P&gt;&lt;P&gt;NEXT vFile;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;// Replace Old QVD file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IF&amp;nbsp; (vStore = 'Yes' ) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; Store [DATA_TABLE] into &lt;SPAN style="font-size: 13.3333330154419px;"&gt;c:/blah.qvd&lt;/SPAN&gt; (qvd);&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-of-New-Files-Only/m-p/865072#M654591</guid>
      <dc:creator />
      <dc:date>2015-07-14T15:23:13Z</dc:date>
    </item>
  </channel>
</rss>

