Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable creation which one is better

Hi all,

Have a nice day.

performance wise which method is better for creating Variable

Method 1: By going into menu -> settings/variable overview

Method 2: By using SET and LET statements.

Method 1 and method 2 both are same result

Thank,

ramu


5 Replies
sasikanth
Master
Master

Hi,

case comes only when a  variable evaluates complex expression

in that case

In front end for every selection expressions need to be evaluated

if you are able to calculate this exp from backed then declare at script level

avinashelite

As per my knowledge LET method does not evaluate and hence it will have better performance but you cannot do the dynamic changes. Other than this both the ways of the setting the variables are same does not have much of the difference in the performance

jonathandienst
Partner - Champion III
Partner - Champion III

The main advantage of creating the variables in the load script is that the variables are preserved in the case of a no-data load. You may need a no-data load for recovering a corrupt qvd or rolling back to an older version when you are using version control. In these cases, the variables exist in the empty document, but are all set to null.

If they are defined in the load script, then they will be recreated when the empty document is reloaded. Which is why I recommend that the variables be defined in the load script.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagan
Luminary Alumni
Luminary Alumni

Hi,

Creating in script will help in easily maintenance if you want to change many variables you can change it easily in script, instead of searching in variables tab.

If you require the same in another Dashboard you can just copy the script and use it in the new one.

Regards,

Jagan.

kashaboinaraj
Creator
Creator

Hi

creating variable in script is better because for searching for variable it is easy to go direcrtly to the script location for changes.

Regards

vishnu