Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jasonfreitas
Contributor
Contributor

Resident Table Persistence

I'm trying to figure out if resident tables persist in a QVW after saving, allowing for future executions to reference those tables. I always thought they did, but I just noticed a problem with an application that suggests they don't (or something has changed in the environment that is causing different behavior).

Here is an example of how I can recreate the error:

Create script:

Table1:

LOAD * Inline [

Field1

Value1

];

Reload and save QVW.

Reopen the QVW and note that Table1 exists with one row in the Table Viewer.

Alter the script (delete the old code) and replace with:

Table2:

LOAD

Field1 as Field2

Resident Table1;

Upon subsequent reload, error is:

Table not found

Table2:

LOAD

Field1 as Field2

Resident Table1

Is this normal behavior? In my actual application, I don't actually delete code, of course. The difference is that the equivalent Table1 is built in an IF construct. Subsequent reloads need to reference this table that was built in a prior execution.

1 Solution

Accepted Solutions
5 Replies
awhitfield
Partner - Champion
Partner - Champion

Resident refers to the table residing in memory with the context off the document, so once you've commented it out and reloaded it's gone!

Andy

jasonfreitas
Contributor
Contributor
Author

Ah, yes -- that makes sense. I guess I was hoping that there was a way to access the table in the saved QVW without having to reload it from the original source. When I open it up (after the first load), I see the table in the Table Viewer with a rowcount. Is there another way to load the table into memory? Should the NoOfRows function work on that table?

ramoncova06
Specialist III
Specialist III

you can if you do a binary load to the document itself

ramoncova06
Specialist III
Specialist III

maxgro
MVP
MVP

to make persistent data you can use

- .qvw and binary load (as Ramon already suggested);

- qvd (1 .qvd is one table in a file); search in Qlik help qvd