Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Santosh
Contributor III
Contributor III

Difference between ApplyMap and Resident load

Hi

I am new to qlikview please help me with this Question.

What is difference between ApplyMap and Resident load.

1 Solution

Accepted Solutions
arvind1494
Specialist
Specialist

Applymap:

The ApplyMap script function is used for mapping the output of an expression to a previously loaded mapping table.


Note: In maping load mapping table exists in qlik memory at the time of execution only.

his function will match with the first value found


// Load mapping table of country codes:

map1: mapping LOAD * Inline

[ CCode, Country

Sw, Sweden

Dk, Denmark

No, Norway

] ;

// Load list of salesmen, mapping country code to country

// If the country code is not in the mapping table, put Rest of the world

Salespersons: LOAD *, ApplyMap('map1', CCode,'Rest of the world') As Country

Inline [

CCode, Salesperson

Sw, John

Sw, Mary

] ;

// We don't need the CCode anymore Drop Field 'CCode';


Resident load:-

n QlikView, Resident Load can be used to load data from a previously loaded table. In Resident Load, we can do a calculation or transformation. It is very simple to load an existing field and table also. It is a highly important feature of QlikView because by using Resident Load, we perform a calculation on an existing field and table also.


e,g.


Sales_T:

Load * Inline [

TxnID,Amount

101,456454

102,456454

103,455446

104,456787

105,446464

106,458464

];

Sales:

Load * resident Sales_T;

Drop Table Sales_T;

View solution in original post

4 Replies
arvind1494
Specialist
Specialist

Applymap:

The ApplyMap script function is used for mapping the output of an expression to a previously loaded mapping table.


Note: In maping load mapping table exists in qlik memory at the time of execution only.

his function will match with the first value found


// Load mapping table of country codes:

map1: mapping LOAD * Inline

[ CCode, Country

Sw, Sweden

Dk, Denmark

No, Norway

] ;

// Load list of salesmen, mapping country code to country

// If the country code is not in the mapping table, put Rest of the world

Salespersons: LOAD *, ApplyMap('map1', CCode,'Rest of the world') As Country

Inline [

CCode, Salesperson

Sw, John

Sw, Mary

] ;

// We don't need the CCode anymore Drop Field 'CCode';


Resident load:-

n QlikView, Resident Load can be used to load data from a previously loaded table. In Resident Load, we can do a calculation or transformation. It is very simple to load an existing field and table also. It is a highly important feature of QlikView because by using Resident Load, we perform a calculation on an existing field and table also.


e,g.


Sales_T:

Load * Inline [

TxnID,Amount

101,456454

102,456454

103,455446

104,456787

105,446464

106,458464

];

Sales:

Load * resident Sales_T;

Drop Table Sales_T;

qlikviewwizard
Master II
Master II

Please check this.

// LOAD MAPPING TABLE OF COUNTRY CODES:

MAP1:

MAPPING LOAD * INLINE [

CCODE, COUNTRY

SW, SWEDEN

DK, DENMARK

NO, NORWAY

] ;

// LOAD LIST OF SALESMEN, MAPPING COUNTRY CODE TO COUNTRY

// IF THE COUNTRY CODE IS NOT IN THE MAPPING TABLE, PUT REST OF THE WORLD

SALESPERSONS:

LOAD SALESPERSON,

APPLYMAP(‘MAP1′, CCODE,’REST OF THE WORLD’) AS COUNTRY

INLINE [

CCODE, SALESPERSON

SW, JOHN

SW, MARY

SW, PER

DK, PREBEN

DK, OLLE

NO, OLE

SF, RISTTU] ;

Miguel_Angel_Baeyens

As I mentioned in the duplicated post, be careful in the example for RESIDENT, as it will drop all data.

Use NOCONCATENATE before the LOAD of the table "Sales".