<?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: Loading different data sets at different times in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665152#M50042</link>
    <description>&lt;P&gt;or you could instead of time you could use a temp table which you set a flag save it as qvd and manipulate so that it will run only on first run of&amp;nbsp;monday&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LoadPerformedTempTable:
LOAD * from [lib://FolderConnection/LoadPerformed.qvd] ;
let vLoadPerformed = 
              Peek('LoadPerformed',0,'LoadPerformedTempTable');
drop table LoadPerformedTempTable;

If WeekDay(today())=1 and vLoadPerformed=0  then

   /**
       Add your weekly load statements
   **/
  // Mark load as performed so that load is performed only once on monday
	LoadPerformedTempTable:
	load * inline [
	LoadPerformed
	1
	];
	
	Store * from LoadPerformed into 
                 'lib://FolderConnection/LoadPerformed.qvd';
	drop table LoadPerformedTempTable;

elseif WeekDay(today())=2 then 
      //On tuesday mark it back to zero so that first run next monday 
       //everything will load 
      LoadPerformedTempTable:
	load * inline [
	LoadPerformed
	0
	];
	
	Store * from LoadPerformed into 
                 'lib://FolderConnection/LoadPerformed.qvd';
	drop table LoadPerformedTempTable;
end if&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2020 18:00:32 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2020-01-13T18:00:32Z</dc:date>
    <item>
      <title>Loading different data sets at different times</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665072#M50035</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a REST connection that is bringing in data from a web service every 5 minutes using the scheduler in the QMC.&amp;nbsp; I also have 6 files that call on SQL Server for data that &lt;EM&gt;usually&lt;/EM&gt; stays the same but could change.&amp;nbsp; I would like to set up my app so that Qlik only loads those files weekly.&amp;nbsp; Is it possible to have the app on a schedule to load every 5 minutes but only load the other files weekly?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 14:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665072#M50035</guid>
      <dc:creator>kdaniels-obrien</dc:creator>
      <dc:date>2020-01-13T14:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Loading different data sets at different times</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665145#M50041</link>
      <description>&lt;P&gt;You can put the calls you want to do weekly within a if condition. and load&amp;nbsp; it only on a certain day of the week and before certain time&lt;/P&gt;&lt;P&gt;e.g. Load&amp;nbsp; it only on Mondays and approxiate time of first run on monday is before 1 am&lt;/P&gt;&lt;P&gt;If WeekDay(today())=1 and hour(now()) &amp;lt;1 then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//your load statements&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 17:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665145#M50041</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2020-01-13T17:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loading different data sets at different times</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665152#M50042</link>
      <description>&lt;P&gt;or you could instead of time you could use a temp table which you set a flag save it as qvd and manipulate so that it will run only on first run of&amp;nbsp;monday&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LoadPerformedTempTable:
LOAD * from [lib://FolderConnection/LoadPerformed.qvd] ;
let vLoadPerformed = 
              Peek('LoadPerformed',0,'LoadPerformedTempTable');
drop table LoadPerformedTempTable;

If WeekDay(today())=1 and vLoadPerformed=0  then

   /**
       Add your weekly load statements
   **/
  // Mark load as performed so that load is performed only once on monday
	LoadPerformedTempTable:
	load * inline [
	LoadPerformed
	1
	];
	
	Store * from LoadPerformed into 
                 'lib://FolderConnection/LoadPerformed.qvd';
	drop table LoadPerformedTempTable;

elseif WeekDay(today())=2 then 
      //On tuesday mark it back to zero so that first run next monday 
       //everything will load 
      LoadPerformedTempTable:
	load * inline [
	LoadPerformed
	0
	];
	
	Store * from LoadPerformed into 
                 'lib://FolderConnection/LoadPerformed.qvd';
	drop table LoadPerformedTempTable;
end if&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 18:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-different-data-sets-at-different-times/m-p/1665152#M50042</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2020-01-13T18:00:32Z</dc:date>
    </item>
  </channel>
</rss>

