Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

resident load with examples?

resident load with examples?

8 Replies
Not applicable
Author

Resident is word means from RAM. Suppose if we get the table from source example SalesRep.we saved locally in qlikview with name SalesRep.then we want to use it again then instead connecting source and getting the fields we use resident load like below.

for example:

Resident Load:

Temp:

LOAD

*

FROM Data;

Temp1:

LOAD

*

FROM Temp;

Temp2:

LOAD

*

FROM Temp;

regards

Mahesh T.

Not applicable
Author

Resident load and precedding load

check the above link will be helpful to you.

regards

Mahesh T

maxgro
MVP
MVP

resident pag. 14 and a lot of other load

LOAD data into QlikView

chiru_thota
Specialist
Specialist

Syntax:
load [ distinct ] *fieldlist

[( from file [ format-spec ] |

from_fieldfield [format-spec]

resident table-label  )]

[ where criterion ] | while criterion ]

[ group_by fieldlist ]

[order_by field [ sortorder ] { , field [ sortorder ] } ]

If you are not able to follow the syntax try the example below,

Example:

The resident table is useful when we want to split a table into multiple cubes, say for example when we want to create table X with specific year using the main table A and create another table Y with specific division/department using the same main table A it is possible using RESIDENT Table concept.

Table: A

Division

Department

Year

1

A

2010

2

B

2011

3

C

2010

4

D

2012

5

E

2010


X:
Load * from A Where year=2010;

Output:

Table: X

Division

Department

Year

1

A

2010

3

C

2010

5

E

2010



Y:
Load * from A Where Div in ('1','3');

Output:

Table: Y

Division

Department

Year

1

A

2010

3

C

2010

Christian_Lauritzen
Partner - Creator II
Partner - Creator II

Here is an example on resident load, i.e. you load from an already loaded table. Below we first create the table Countries. Here Inline is used, but it might as well have been loaded from a database or spreadsheet. In the second statement the RESIDENT syntax is used to load values from the Countries table to create a new field for countries larger than 500 000 km2. The tables are joined. Hope this helps you on the way.

Countries:

LOAD * INLINE [   

     Country, Area   

     France, 547030   

     Spain, 505782   

     Sweden, 449964   

     Norway, 385252 ];

Join(Countries) Load

          Country,

          Area,

          '>500 000' as Category

Resident Countries

Where Area>500000;

Result:

Temp.png

Email: christian.lauritzen@b3.se
Not applicable
Author

Hi Manoj,

can you please close the thread if you are fine with answers posted so that it will be helpful to other users as well.

regards

Mahesh T

MK_QSL
MVP
MVP

Let me also try...

Temp:

Load * Inline

[

     Customer, Sales

     A, 100

     B, 200

     A, 300

     C, 150

     D, 200

     B, 140

     E, 400

     C, 340

];

//The above table is showing only two columns but it should have some dates, months or years but it is not necessary //for this example, so I haven't mentioned.

Final:

Load

     Customer,

     SUM(Sales) as [Total Sales]

Resident Temp

Group By Customer;

Drop Table Temp;

//The 2nd table is calculating Total Sales per customer using Resident Load of First Table.

//We don't need Temp table, so we can remove it now.

Hope this help.