Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ranjanac
Contributor III
Contributor III

Mapping Load()

Mapping Load()

Requirements- we have 2 tables:Order & Product, we want table value will map the 2 tables and create one.

My question:

1. Will this script shows the expected output ??
2. Can we use Load * in Mapping load ??

//In load editor

Product:
Mapping
Load *
from [lib://source/product.xlsx];

order:
Load *
ApplyMap('Product','PID'Null()) as Product
from [lib://source/product.xlsx] ;

//Expected output

Order
Order ID
Order Name
Product name
PID
Price
Quantity
1 Solution

Accepted Solutions
2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Using * is not advised for Mapping loads. For a successful Mapping load, you need to load only two fields, and they should appear in the correct order - first the field with the values "from" and then the field with the mapped values ("to").

So, if you want to map PID to Product Name, you would do it like this:

Product_Map:
Mapping
Load 

   PID,

   Name

from [lib://source/product.xlsx];

order:
Load

   *,
    ApplyMap('Product',   PID ) as ProductName

from [lib://source/product.xlsx] ;

I recommend to leave the optional third parameter of the ApplyMap() function empty, to see those products that might be missing in the mapping table. Otherwise, you will not be able to see them or select them, if the value is NULL.

Cheers,

Ranjanac
Contributor III
Contributor III
Author

Thanks a lot @Oleg_Troyansky