<?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 Environment Variable setup in Qlikview (To Make connection string configurable) same as SSIS in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Environment-Variable-setup-in-Qlikview-To-Make-connection-string/m-p/822639#M661605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just trying to make the path configurable so that when we move from Development to production environment, we should change the path only in configuration and should not open the code and change the path or connection string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Achieve this, I added all my configurable variables in a text file (qlikview_file_config.txt) and include that file in my script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vDWHConnectionString='[Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DB_NAME;Data Source=SERVER_NAME;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=ABC;Use Encryption for Data=False;Tag with column collation when possible=False]';&lt;/P&gt;&lt;P&gt;SET vDimQVDStoragePath='D:\Shivendoo\Dim Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vFactQVDStoragePath='D:\Shivendoo\Fact Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vBKPDimFolderPath='D:\Shivendoo\QVD BackUp\Dim Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vBKPFactFolderPath='D:\Shivendoo\QVD BackUp\Fact Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vArchieveQVDsFolderPath='D:\Shivendoo\Archieve QVDs';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This condition will allow to load only 2 years of Data from Today()&lt;/P&gt;&lt;P&gt;SET vTwoYearsOldDate=DATE(Today()-735);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Include the QlikView Configuration File&lt;/P&gt;&lt;P&gt;$(Include=d:\shivendoo\qlikview config\qlikview_file_config.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Get Connection String from QlikView Configuration File&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO $(vDWHConnectionString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still my purpose is not achieved and I am always forced to keep file qlikview_file_config.txt on d:\shivendoo\qlikview config\qlikview_file_config.txt in all the Environments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Case, In Test Env I have to keep on C:\shivendoo\qlikview config\qlikview_file_config.txt then I need to modify the code which I don't want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me in making it configurable using computer Environment Variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 03:54:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-18T03:54:39Z</dc:date>
    <item>
      <title>Environment Variable setup in Qlikview (To Make connection string configurable) same as SSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Environment-Variable-setup-in-Qlikview-To-Make-connection-string/m-p/822639#M661605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just trying to make the path configurable so that when we move from Development to production environment, we should change the path only in configuration and should not open the code and change the path or connection string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Achieve this, I added all my configurable variables in a text file (qlikview_file_config.txt) and include that file in my script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vDWHConnectionString='[Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DB_NAME;Data Source=SERVER_NAME;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=ABC;Use Encryption for Data=False;Tag with column collation when possible=False]';&lt;/P&gt;&lt;P&gt;SET vDimQVDStoragePath='D:\Shivendoo\Dim Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vFactQVDStoragePath='D:\Shivendoo\Fact Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vBKPDimFolderPath='D:\Shivendoo\QVD BackUp\Dim Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vBKPFactFolderPath='D:\Shivendoo\QVD BackUp\Fact Data Source QVD Files';&lt;/P&gt;&lt;P&gt;SET vArchieveQVDsFolderPath='D:\Shivendoo\Archieve QVDs';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This condition will allow to load only 2 years of Data from Today()&lt;/P&gt;&lt;P&gt;SET vTwoYearsOldDate=DATE(Today()-735);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Include the QlikView Configuration File&lt;/P&gt;&lt;P&gt;$(Include=d:\shivendoo\qlikview config\qlikview_file_config.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Get Connection String from QlikView Configuration File&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO $(vDWHConnectionString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still my purpose is not achieved and I am always forced to keep file qlikview_file_config.txt on d:\shivendoo\qlikview config\qlikview_file_config.txt in all the Environments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Case, In Test Env I have to keep on C:\shivendoo\qlikview config\qlikview_file_config.txt then I need to modify the code which I don't want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me in making it configurable using computer Environment Variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 03:54:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Environment-Variable-setup-in-Qlikview-To-Make-connection-string/m-p/822639#M661605</guid>
      <dc:creator />
      <dc:date>2015-03-18T03:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variable setup in Qlikview (To Make connection string configurable) same as SSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Environment-Variable-setup-in-Qlikview-To-Make-connection-string/m-p/822640#M661606</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;/P&gt;&lt;P&gt;1. Store your config file in same directory where you keep your QVW or in sub-directory, for example &lt;STRONG&gt;config&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. Do not point full paths in script, keep using relative paths:&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;EM&gt;$(Include=./qlikview_file_config.txt);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;or&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;EM&gt;$(Include=./config/qlikview_file_config.txt);&lt;/EM&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;3. In case you're not sure the QVW will be opened with a valid working directory, use &lt;SPAN class="Bold"&gt;&lt;STRONG&gt;QvWorkPath&lt;/STRONG&gt; sys var:&lt;/SPAN&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;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(Include=$(QvWorkPath)/config/qlikview_file_config.txt);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;4. Use &lt;STRONG&gt;Must_Include&lt;/STRONG&gt; instead of &lt;STRONG&gt;Include&lt;/STRONG&gt;. This keep the brain safe against 'what happens and why this fails?' issues &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, 27 Mar 2015 23:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Environment-Variable-setup-in-Qlikview-To-Make-connection-string/m-p/822640#M661606</guid>
      <dc:creator />
      <dc:date>2015-03-27T23:52:03Z</dc:date>
    </item>
  </channel>
</rss>

