Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Temp table not dropping (Temp-1)

Hello,

I am facing a weird phenomena.

Assume this scenario:

Script 1:

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Right Keep ('T1')

Load

*

Resident Temp;

Drop Table Temp;

The Output: T1 linked to Temp-1with T1 reduced in content to only x values.

Script 2

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Right Keep ('T1')

Temp1:

Load

*

Resident Temp;

Drop Tables Temp, Temp1;

The Output: T1 with T1 reduced in content to only x values.

Usually this doens't happen with me(or I don't notice it:) ),  so can anyone share his insight?


Thanks,


Antoine

1 Solution

Accepted Solutions
Gysbert_Wassenaar

In the first script you don't specify a table name. Right Keep does keep the table, so it gets a name from Qlikview. Had you used right join instead you'd have only the reduced T1 left. This has the same effect as using right keep, giving the table the name Temp-1 and dropping Temp and Temp-1 at the end.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

I dont understand the issue?

You gave the example. But I couldn't get the issue your facing.

Gysbert_Wassenaar

In the first script you don't specify a table name. Right Keep does keep the table, so it gets a name from Qlikview. Had you used right join instead you'd have only the reduced T1 left. This has the same effect as using right keep, giving the table the name Temp-1 and dropping Temp and Temp-1 at the end.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I realise fully what you are telling me and it is correct. and makes sense...

thanks,

Antoine

Anonymous
Not applicable
Author

Well, Try copying the script and running the routine for both scenarios.

     in the first one you will see a "new" table with a -1 index;

     in the second one, you will not see it.

I thought that when I issue the drop table, the original table and the resident table get dropped. Which is not the case.

So actually, I better understand now how resident load work. it actually duplicates the table, and not simply creates a reference.

swuehl
MVP
MVP

Just another note (if I understood correctly what you are trying to achieve):

You don't need a join / keep at all:

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

] Where Exists(A);

Drop Table Temp;

CELAMBARASAN
Partner - Champion
Partner - Champion

Why you don't use Left Keep for this case

Temp:

Load * Inline [

A,

x,

];

Left Keep(Temp)

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Drop Table Temp;

Anonymous
Not applicable
Author

An even cleaner solution !

Thank you

Antoine


EDIT: mixed up with another post