Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am currently building a script which involves several tables, some of which need to be loaded during the full reload and some of which need to be loaded during the partial reload. The issue here is that the full reload tables cannot all be reloaded during the full reload, same thing for the partial reloads. Below is a bit of a diagram of what I would like to have happen:
Table1a: reload ONLY when full reload AND variable vTable = 1
Table2a: reload ONLY when full reload AND variable vTable = 2
Table1b: reload ONLY when partial reload AND variable vTable = 1
Table2b: reload ONLY when partial reload AND variable vTable = 2
When I try to reload/partial reload, I notice that both Table1a and Table2a are dropped, and then, depending on the value in vTable, one of the "a" tables is reloaded. Is there a way to prevent both tables from being dropped during the full reload and partial reload?
e.g., when qlikview is reloaded and vTable = 1, Table1a is reloaded, however Table2a is empty.
Similarly, when the partial reload is triggered, both "b" tables are dropped and only one table is repopulated (depending on the vTable value).
In short, how can I prevent a specific table from being dropped when reloading a qlikview file?
To answer your questions:
Yes.
No, all tables with REPLACE LOAD prefix get replaced, i.e. dropped, then loaded. If you don't want to drop / modify the tables, create a conditional execution path based on IsPartialReload and the table to reload identifier.
Dropping of the tables occurs when encountering the REPLACE prefix.
I don't think you can prevent Qlik from starting 'empty' when doing a full reload, that's basically what a partial reload is designed for.
You can use system function IsPartialReload() to check the reload type and perform actions based on it (branch into different execution pathes)
Returns -1 (True) if the current reload is partial, otherwise 0 (False). This only works in the script.
Thank you for the response.
okay, so if I were to use the partial reloads, would I be able to only reload one of the 4 tables in the example above without dropping the other 3? If it is a partial reload, don't all of the tables with the REPLACE LOAD script get dropped? Could this be prevented using conditional statements?
when does the dropping of the tables occur? Is it upon triggering the partial reload or is it done once the code is ran and the REPLACE LOAD is found?
My dashboard will end up having several back end tables and tabs which could be reloaded all at once, however this would create significant wait times and potential timeouts. I am looking to just load one of the many tables at a time so the user only has to refresh what sheets they intend to use.
Something like this?
To answer your questions:
Yes.
No, all tables with REPLACE LOAD prefix get replaced, i.e. dropped, then loaded. If you don't want to drop / modify the tables, create a conditional execution path based on IsPartialReload and the table to reload identifier.
Dropping of the tables occurs when encountering the REPLACE prefix.
thank you for the help!
I think I will have to have all my tables be partial reloads, but if I am able to control which tables get dropped using conditional statements then this should solve the issue.
The example provided might be a bit difficult to implement since each query I have has different column names/counts/types and they also have many sub tables.
Sure, the example should just demonstrate that you don't need to reload all tables.
Hello
I did not understand how to set Partial laod in qlik sense??