Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Qlikview tables lifecycle after script execution

Hi

I have a question regarding qlikview tables lifecycle.

  • When you have an QV document open and execute a script (LOAD FROM qvd), does the table after execution gets deleted from internal storage (without executing DROP TABLE-statement)? What about variables?
  • What about the same QV document run by the qv.exe /r command in CMD (open/reload/close)?

Kind regards

A.H.

Tags (1)
1 Solution

Accepted Solutions
john_s_w_wood
Contributor

Re: Qlikview tables lifecycle after script execution

Hi A.H.

Unless you have a drop table statement in your script and/or  a 'set variable = null()' statement for variables, they will remain in memory whilst the document is open. (A look at your task manager (right click on the task bar) will show you how much memory is being taken up by your qlikview document. If its a big document with lots of data it will be up there at the top!) 

Even though the table(s) are not visible as such in the dashboard itself (only the fields) if you look at the table viewer (file>tableviwer) you will see all the tables 'in memory', Hover over the header of the table and it will show you how many rows there are.

If you do not see any tables, its either failing to load or you have a drop table(s) statement somewhere in the script.

Note variables are not the same as fields data in the tables. A variable will only hold 'one bit of data' whereas a field could have thousands of rows. Variables are generally used as a user input eg exchange rate or even for holding a formula to be used in multiple  of charts e.g. '=sum(Cost)/sum(Sales)'

6 Replies
john_s_w_wood
Contributor

Re: Qlikview tables lifecycle after script execution

A reload of a document will replace the data already in the document (Tables per table viewer). Your variable values should not change unless you are creating them within the load script

e.g. set vLastID = '102';

The same should apply with the command line run.

Exceptions can be if you set up a partial / incremental load mechanism (see elsewhere in the community)

Not applicable

Re: Qlikview tables lifecycle after script execution

Thx for quick response.

What about running script only once, does QV drop tables and variables right after the execution? If not, how long are they staying in the memory or other QV storage (if such exists)?

Kind regards

A.H.

john_s_w_wood
Contributor

Re: Qlikview tables lifecycle after script execution

Hi A.H.

Unless you have a drop table statement in your script and/or  a 'set variable = null()' statement for variables, they will remain in memory whilst the document is open. (A look at your task manager (right click on the task bar) will show you how much memory is being taken up by your qlikview document. If its a big document with lots of data it will be up there at the top!) 

Even though the table(s) are not visible as such in the dashboard itself (only the fields) if you look at the table viewer (file>tableviwer) you will see all the tables 'in memory', Hover over the header of the table and it will show you how many rows there are.

If you do not see any tables, its either failing to load or you have a drop table(s) statement somewhere in the script.

Note variables are not the same as fields data in the tables. A variable will only hold 'one bit of data' whereas a field could have thousands of rows. Variables are generally used as a user input eg exchange rate or even for holding a formula to be used in multiple  of charts e.g. '=sum(Cost)/sum(Sales)'

john_s_w_wood
Contributor

Re: Qlikview tables lifecycle after script execution

ps When you save the document away and close qlikview, the document holds the data (have a look at its file size!) but it is released from memory. When you reopen the document from file, without reloading,  the data is there and is immediately taking space in memory.

Hope this helps

john_s_w_wood
Contributor

Re: Qlikview tables lifecycle after script execution

RAM Memory Impact when open....

memory.JPG

file size when saved (released from RAM memory when closed)

filesize.JPG

Not applicable

Re: Qlikview tables lifecycle after script execution

thx John

Community Browser