Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to decide choose which table is apply map and which table is mapping table?
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!