Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Qlik Sense documentation and resources.
You will need to run a script to loop through all the Governance Dashboard table in order to store them in QVDs.
This loop is available in the "05a*. CONFIG" tab.
The tabs 05a to 05f are to analyse log files and link them back to the tasks. It then will follows the logic and data model which goes from Task > App ( > Script) > QVD.
Set the library connection to "vQMC_QVD_Store" where the Governance Dashboard QVDs are contained.
Set the URL to the QlikSense server you are analysing in "vQlikSenseServer".
In the "Full_Paths_To_Folder" inline table, set the library paths to the folders where you generate and store your QVDs from your scripts.
Please check the script portion just above this table, as you can set times during the day when you run the QVD files analyses. The QVD analysis portion of script can take long depending on the amount of QVDs you have. The rest of the task analysis portion should take less than a minute.
In order to run the script analysis test, set "vRunLogAnalysis" to 'Yes' and set the location of the folder where the log files are contained in "vScriptLogFolder".
If you use standardised sub-routines (Calls) you can set the wildmatch-string search in the "Script_KeyWords_Categorisation_List" table.
The 05g tab will run a dependency table that will link all your tasks and apps depdendency on QVDs as written in your script logs.
There is a lot material on the community on explaining the difference between the functions SET and LET. The gist of it is: SET stores the variable with the expression string and LET will evaluate the expression first.
I tend to think of them as:
SET the value in place.
LET‘s evaluate.
But in reality, I hardly ever use SET. The whole difference of the them producing different results is on the premise that you don’t use quotes.
Take this example:
Set vSetToday = Today();
Let vLetToday = Today();
Trace ------------------------------- vSetToday: $(vSetToday);
Trace ------------------------------- vLetToday: $(vLetToday);
Which returns:
However, if you utilize quotes, the result is the exact same:
Set vSetTodayQuote = 'Today()';
Let vLetTodayQuote = 'Today()';
Trace ------------------------------- vSetTodayQuote: $(vSetTodayQuote);
Trace ------------------------------- vLetTodayQuote: $(vLetTodayQuote);
Which returns:
With that said, I argue that you should always use quotes. Using quotes is being explicit which I believe is tantamount in best practice coding. Also, you will notice Qlik’s generated variables use quotes, so that’s another example straight from the source.
So my first point is use quotes!
So now that they are for the most part the same, is there even a reason to use SET? The only thing I could think of was performance reasons. To test this use case, I made a quick script to see if there was any tangible difference in using SET vs LET on setting a string variable.
This test does 5,000,001 iterations of setting a variable using each function and printing the result.
// SET Test
Let vSetStart = Now();
For s = 0 to 5000000
SET vSetTest = '$(s)';
next s
Let vSetEnd = Now();
Let vSetDuration = Interval('$(vSetEnd)' - '$(vSetStart)','hh:mm:ss');
Let vLetStart = Now();
// LET Test
For l = 0 to 5000000
LET vLetTest = '$(l)';
next l
Let vLetEnd = Now();
Let vLetDuration = Interval('$(vLetEnd)' - '$(vLetStart)','hh:mm:ss');
Trace ------------------------------- vSetDuration: $(vSetDuration);
Trace ------------------------------- vLetDuration: $(vLetDuration);
This test returns…..
LET is potentially faster, though I would say that it is at an amount that it doesn’t matter. It’s also worth noting that tests of 5,001, 50,001, and 500,001 were the same. However what this does prove, is that the biggest potential reason to use SET over LET doesn’t exist. So given all that, just use LET.
LET is all you need.
…Except for Lists
At the moment I am aware of only one reason to use SET over LET and that is for building a list. You can create a list to iterate over using both, however using LET is much more painful. The LET statement you have to build in the quotes using Chr(39), which is not pretty and/or fun.
Example:
SET vSetArray = 'One','Two','Three';
LET vLetArray = chr(39)&'Four'&chr(39)&','&chr(39)&'Five'&chr(39)&','&chr(39)&'Six'&chr(39);
Trace ----------------- $(vSetArray);
For each s in $(vSetArray)
Trace ----------------- $(s);
Next s
Trace ----------------- $(vLetArray);
For each l in $(vLetArray)
Trace ----------------- $(l);
Next l
Tell me if there are if there are any other reasons for using SET over LET, because for now I think 99% of the time LET is all we need.