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: 
Tanisha_36
Contributor II
Contributor II

Apply Map

how to decide choose which table is apply map and which table is mapping table?

Labels (3)
1 Reply
Sayed_Mannan
Creator II
Creator II

Hi Tanisha, In Qlik, the decision of which table to use as the mapping table and which to apply the map to depends on your data and objectives:

Mapping Table: This is the table that contains the data you want to use to transform or enrich the data in another table. It's created by placing the prefix Mapping before the LOAD statement.

Table to Apply Map: This is the table that contains the data you want to transform or enrich. You use the ApplyMap function to create a new column in this table by mapping data from the mapping table.

I am providing you a simple example for your reference:

// Mapping table
mapTable:
Mapping LOAD
ID,
Value
FROM Test;

// Table to apply map
dataTable:
LOAD
*,
ApplyMap('mapTable', ID, 'No match') as NewValue
FROM testData;

In this example, mapTable is the mapping table, and dataTable is the table to which the map is applied. The ApplyMap function creates a new column NewValue in dataTable by mapping the ID column in dataTable to the ID column in mapTable. If there's no match, it returns 'No match'.

 

I hope this helps!