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: 
Purushothaman
Partner - Creator III
Partner - Creator III

$(Include=

Hi Experts,

What does this highlighted statement do in script editor

$(Include=Path_local.txt);

Purushothaman_0-1649822741331.png

 

Please help!!

 

2 Solutions

Accepted Solutions
njmaehler
Partner - Creator
Partner - Creator

Firstly, you need to see what is in that file called Path_Local.txt
The Include statement is used to contain code OUTSIDE of Qlik so that it can be shared by multiple models and therefore reduce maintenance across all models. Another advantage is that you go to a single place outside of the script editor to make a change and all models using that file within an Include statement will automatically be updated the next time each model is reloaded. (i.e. you do not have to open each model individually and change the code).
Typically, people put either their QVD paths or connection strings in Include files or common code like creating a Calendar off your FACT table. Basically, one version of the truth and a single place to maintain (again, outside of Qlik).  Some companies use the Include statement on the connection strings so that when the model is in test it points to Server 1 and then when rolling the model to production they can just have another txt file with the same name on the production server that connects to the production database and no code change is required at all to roll between the different environments. Very handy when used correctly. 

Think of it literally picking up the code from the text file and placing it into the script at the exact point you are calling the Include statement. 
Just remember that QlikView code differs to Qlik Sense code as far as paths are concerned. 

View solution in original post

anat
Master
Master

yes ,you need to get the physical file then you have to change the paths inside the file

View solution in original post

5 Replies
anat
Master
Master

Purushothaman
Partner - Creator III
Partner - Creator III
Author

@anat ,

Thanks for your prompt reply. I am converting this QVW ( QlikView) to QVF ( Qlik Sense). What should I write in Qlik Sense data load editor? 
Before executing in Qlik Sense, Do I need to get the physical file of Path_local.txt?

Please help!

Many Thanks!

njmaehler
Partner - Creator
Partner - Creator

Firstly, you need to see what is in that file called Path_Local.txt
The Include statement is used to contain code OUTSIDE of Qlik so that it can be shared by multiple models and therefore reduce maintenance across all models. Another advantage is that you go to a single place outside of the script editor to make a change and all models using that file within an Include statement will automatically be updated the next time each model is reloaded. (i.e. you do not have to open each model individually and change the code).
Typically, people put either their QVD paths or connection strings in Include files or common code like creating a Calendar off your FACT table. Basically, one version of the truth and a single place to maintain (again, outside of Qlik).  Some companies use the Include statement on the connection strings so that when the model is in test it points to Server 1 and then when rolling the model to production they can just have another txt file with the same name on the production server that connects to the production database and no code change is required at all to roll between the different environments. Very handy when used correctly. 

Think of it literally picking up the code from the text file and placing it into the script at the exact point you are calling the Include statement. 
Just remember that QlikView code differs to Qlik Sense code as far as paths are concerned. 

anat
Master
Master

yes ,you need to get the physical file then you have to change the paths inside the file

Purushothaman
Partner - Creator III
Partner - Creator III
Author

@anat @njmaehler 

Thanks a lot for a going a mile further and explaining me this things. Much Appreciated!!