Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Path selection

Hi Guys,

I have created the dashboard in UAT environment using excel as a soruce data. Now I want to dynamically chane the environment (i.e. Prod or UAT). Can anyone help me how can I do that?

Thanks in Advance.

Cheers,

Varun

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Massimo's excellent suggestion works like this:

  • All platform related settings are stored in an external include file that will be stored in a fixed place with respect to your QVW documents..
  • This external include file is platform-dependent, and will not be migrated from UAT to PROD or vice-versa. The include files have to be created for each different platform.
  • Your document will include whatever plaform-dependent include file it can find, and by doing that will adapt to the current environment.
  • Your document can be migrated from UAT to PROD and back. Simply reloading it will make it platform-aware.

Very simple and very powerful.

Best,

Peter

View solution in original post

10 Replies
maxgro
MVP
MVP

use variables for path folder

keep the path folder variable in an external file (txt, xls)

change the external file

varunreddy
Creator III
Creator III
Author

Can you please explain me in detail?

varunreddy
Creator III
Creator III
Author

Can you provide me any sample, as I never tried this?

maxgro
MVP
MVP

put the include anincludeforpath.txt (attachment) and the a.qvw (attachment) in the same folder

adapt the folder in the include to your pc, reload, check the .qvd is stored in the path you set in the include

if you change one more time the path and reload the .qvd is stored in the new path

using the path variable QVDPath for read and store you can change from prod to dev to test, etc..... because all the files you read and store use the QVDPath

for excel you can do the same think, maybe is better to change the name of the variable in ExcelPath

// a.qvw

$(Must_Include=.\anincludeforpath.txt);

TABLE: load rowno() AutoGenerate 100;

STORE TABLE INTO [$(QVDPath)\TABLE.qvd] (qvd);

// include anincludeforpath.txt

SET QVDPath = 'C:\Users\mgrossi\Downloads';

trace i am an include;

varunreddy
Creator III
Creator III
Author

First we need to create include anincludeforpath.txt

Set vsourcepath and vQVDpath.

Second we need to load from include anincludeforpath.txt

load * from

include anincludeforpath.txt?

Here how can we define Prod and UAT environment?

Regards,

Varun

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Massimo's excellent suggestion works like this:

  • All platform related settings are stored in an external include file that will be stored in a fixed place with respect to your QVW documents..
  • This external include file is platform-dependent, and will not be migrated from UAT to PROD or vice-versa. The include files have to be created for each different platform.
  • Your document will include whatever plaform-dependent include file it can find, and by doing that will adapt to the current environment.
  • Your document can be migrated from UAT to PROD and back. Simply reloading it will make it platform-aware.

Very simple and very powerful.

Best,

Peter

varunreddy
Creator III
Creator III
Author

Hi Peter,

I need to create two include files. One for UAT and one for Prod?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, that's the idea.

All platform-dependent settings (mostly variables but you may have more) will go into an include file that is tied to the platform. You do not have to store stuff in this include file that doesn't change when moving between platforms, so you can keep it pretty clean.

Best,

Peter

varunreddy
Creator III
Creator III
Author

Can you give me a sample script to load using include file.

The syntax I was trying:

set vSourceData = \\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview\Production\Data Files;

set vQVDPath = \\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview\Production\QVD;

Load

* from

$(Include=z:\gdmp\01.gdmp\04. data quality\25. data quality metrics & reporting\98. reporting\dq_qlikview\include files\include file.txt)\

DQIM_AllIssues_History - Master_Post.xlsx]

;

Will this work?