Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Santosh
Contributor III
Contributor III

Difference between ApplyMap vs 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
Miguel_Angel_Baeyens

ApplyMap() is used very similar to what VLOOKUP() function does in Excel, it takes one value in one field and returns the value on the other field. All Mapping tables must have 2 fields, and 2 fields only. Example: Product ID in the fact table and Product ID and Product Name in the mapping table.

See here:

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/MappingFunctions/Apply...

RESIDENT load is used to load from an already existing table of the data model at the moment of executing such load.

See here:

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/load-data-from-previou...

View solution in original post

4 Replies
Miguel_Angel_Baeyens

ApplyMap() is used very similar to what VLOOKUP() function does in Excel, it takes one value in one field and returns the value on the other field. All Mapping tables must have 2 fields, and 2 fields only. Example: Product ID in the fact table and Product ID and Product Name in the mapping table.

See here:

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/MappingFunctions/Apply...

RESIDENT load is used to load from an already existing table of the data model at the moment of executing such load.

See here:

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/load-data-from-previou...

tomasz_tru
Specialist
Specialist

ApplyMap() will secure you from row duplication (this function will match with the first value found)

Tomasz

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;



Miguel_Angel_Baeyens

In your example of RESIDENT you are dropping all data, since when two tables in the same script have the same number of fields and with the same names, they are automatically concatenated. In your example, the table "Sales" is automatically concatenated to the table Sales_T (therefore, table "Sales" does not exist) which is eventually dropped.