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:
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;
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;
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] ;
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".