Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jt422605
Contributor III
Contributor III

Automatic Environment detection with the help of absolute Path

Hi

I have 3 environments DEV/UAT and PROD . The Absolute paths on Server are like

\\ABC\QS_DEV\Files\QVDs\XYZ.QVD

\\ABC\QS_UAT\Files\QVDs\XYZ.QVD

\\ABC\QS_PROD\Files\QVDs\XYZ.QVD

 

Now, based on above I want to create a variable which will detect automatically where I am. That is in PROD it will take the third path.

I dont know how to achieve it in QlikSense as documentpath()  fucntion provided the LIB connection path and not the absolute path. This is weird and I cannot dynamically change the Paths based on my actual enviroment.

I used to do following in Qlikview -

Let vEnv_Detect = Pick(Wildmatch(Documentpath(),'*DEV*','*UAT*','*PROD*'),'DEV','UAT','PROD');

and use above variable like

\\ABC\QS_$(vEnv_Detect)\Files\QVDs\XYZ.QVD

 

How I can do in QlikSense.

 

@Michael_Tarallo   Please help.

Edit :: 

1. I dont want to go with "Legacy Mode" option

2. As QlikSense uses the concept of "connections" which are pointers to a folder path (or a database or other data source).  Do we need to create the  Exactly same LIB names across the Environments? 

Like, in my case - 

\\ABC\QS_DEV\      -->    LIB [ProjectName]   --> in DEV Env

\\ABC\QS_UAT\      -->    LIB [ProjectName]   --> in UAT Env

\\ABC\QS_PROD\      -->    LIB [ProjectName]   --> in  PROD Env

?

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

Why do you need to use document path?

In sense you create connection to a folder with say name QVD_Path and use this to load the qvd

when you move apps between environments a connection of same name would be created. then you edit it to point it to your specific environment 

pradosh_thakur
Master II
Master II

Hi

 

I think you are complicating the simple issue. Like in Qikview we have folder structure that is same across environment we can create the same/similar in Qliksense. I would suggest the following.

In dev create a connection let's sat "qvd_conn" and refer the path \\ABC\QS_DEV\Files\QVDs\XYZ.QVD

in UAT make the connectionname same "qvd_conn" but the path diffrent  \\ABC\QS_UAT\Files\QVDs\XYZ.QVD

Do the same for Prod

 

Now when you reload app or store qvd it will do for it respective folder and server

 

Hope my explanation made sense.

Learning never stops.
Michael_Tarallo
Employee
Employee

Hi JT - I see you have some replies with optimal solutions - let us know how these work for you.

 

Regards,

Mike T

Regards,
Mike Tarallo
Qlik