<?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: Load * From CSV (1st Time When CSV doesn't exist) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659002#M1078536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if not isnull(filesize('path_to_your_file')) then&lt;/P&gt;&lt;P&gt;load...&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2014 11:46:52 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2014-07-11T11:46:52Z</dc:date>
    <item>
      <title>Load * From CSV (1st Time When CSV doesn't exist)</title>
      <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659001#M1078534</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 have a STG where it loads all the fields from CSV files that are continuously being generated over time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP_TABLE: // I force the table to have this fields&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT_ID, DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM ..\Obs_*.csv (txt, utf8, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that the first time that I run this load, I get an error because there aren't any generated files and it can't load anything...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if there's any way to omit if there aren't any loaded CSV files yet without showing an error, so that it would show a blank file only with the headers and no data at the first time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 11:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659001#M1078534</guid>
      <dc:creator />
      <dc:date>2014-07-11T11:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Load * From CSV (1st Time When CSV doesn't exist)</title>
      <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659002#M1078536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if not isnull(filesize('path_to_your_file')) then&lt;/P&gt;&lt;P&gt;load...&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 11:46:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659002#M1078536</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-07-11T11:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Load * From CSV (1st Time When CSV doesn't exist)</title>
      <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659003#M1078538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! It worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 11:52:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659003#M1078538</guid>
      <dc:creator />
      <dc:date>2014-07-11T11:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load * From CSV (1st Time When CSV doesn't exist)</title>
      <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659004#M1078539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An alternative, more elegant way, would be the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vConcatenatePrefix = ;&lt;/P&gt;&lt;P&gt;For each vFileName in FileList('C:\Path\*.csv')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vConcatenatePrefix)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * From [$(vFileName)] (...) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vConcatenatePrefix = Concatenate;&lt;/P&gt;&lt;P&gt;Next vFileName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FileList returns a list of files. If there are no files, the loop is never entered. The first loop, the vConcatenatePrefix will expand to an empty string. The second loop, it will expand to 'Concatenate'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 13:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659004#M1078539</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-11T13:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Load * From CSV (1st Time When CSV doesn't exist)</title>
      <link>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659005#M1078540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Henric! I'm going to try it and tell you the results! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 16:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-From-CSV-1st-Time-When-CSV-doesn-t-exist/m-p/659005#M1078540</guid>
      <dc:creator />
      <dc:date>2014-07-11T16:13:41Z</dc:date>
    </item>
  </channel>
</rss>

