<?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: ETL inside loadscript - Conditional load based on a variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ETL-inside-loadscript-Conditional-load-based-on-a-variable/m-p/498519#M186269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Sounds sensible. What you can do is set the variable at the end of the script instead and give it the value 0. You can pass a variable name + value as parameter if you want to reload it: qv.exe /r &lt;STRONG&gt;/vvToggleETL=1&lt;/STRONG&gt; "d:\qvapps\myqvwapp.qvw". The double v is intended. /v for passing a variable followed by the variable name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. See below:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13823748248089533" jivemacro_uid="_13823748248089533"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if $(vToggleETL) = 1&amp;nbsp; then&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // load text files and develop data model, do any transformation as necessary&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // store tables into QVD's&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // LOAD data model from qvd's&lt;/P&gt;
&lt;P&gt;end if&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;LET vToggleETL = 0;&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 16:52:30 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-10-21T16:52:30Z</dc:date>
    <item>
      <title>ETL inside loadscript - Conditional load based on a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/ETL-inside-loadscript-Conditional-load-based-on-a-variable/m-p/498518#M186268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 5 huge delimited text files containing data that need transformations.&amp;nbsp; For development purposes, I want to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13823711293603664" jivemacro_uid="_13823711293603664" modifiedtitle="true"&gt;
&lt;P style="padding-left: 30px;"&gt;LET vToggleETL = 1;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;if vToggleETL = 1 {&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // load text files and develop data model, do any transformation as necessary&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // store tables into QVD's&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;else {&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // LOAD data model from qvd's&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to toggle vToggleETL from time to time.&amp;nbsp; Also, the client has said the input files will remain the same month to month.&amp;nbsp; So for data refreshes, I'll just toggle vToggleETL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&amp;nbsp; 1)&amp;nbsp; Is this the best approach?&amp;nbsp; 2)&amp;nbsp; Is this the correct syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 15:56:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ETL-inside-loadscript-Conditional-load-based-on-a-variable/m-p/498518#M186268</guid>
      <dc:creator />
      <dc:date>2013-10-21T15:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: ETL inside loadscript - Conditional load based on a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/ETL-inside-loadscript-Conditional-load-based-on-a-variable/m-p/498519#M186269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Sounds sensible. What you can do is set the variable at the end of the script instead and give it the value 0. You can pass a variable name + value as parameter if you want to reload it: qv.exe /r &lt;STRONG&gt;/vvToggleETL=1&lt;/STRONG&gt; "d:\qvapps\myqvwapp.qvw". The double v is intended. /v for passing a variable followed by the variable name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. See below:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13823748248089533" jivemacro_uid="_13823748248089533"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if $(vToggleETL) = 1&amp;nbsp; then&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // load text files and develop data model, do any transformation as necessary&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // store tables into QVD's&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // LOAD data model from qvd's&lt;/P&gt;
&lt;P&gt;end if&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;LET vToggleETL = 0;&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 16:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ETL-inside-loadscript-Conditional-load-based-on-a-variable/m-p/498519#M186269</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-21T16:52:30Z</dc:date>
    </item>
  </channel>
</rss>

