Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am new to qlikview please help me with this Question.
What is difference between ApplyMap and Resident load.
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:
RESIDENT load is used to load from an already existing table of the data model at the moment of executing such load.
See here:
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:
RESIDENT load is used to load from an already existing table of the data model at the moment of executing such load.
See here:
ApplyMap() will secure you from row duplication (this function will match with the first value found)
Tomasz
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;
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.