Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
markp201
Creator III
Creator III

Using applymap with dimension keys...

I wonder if I can use applymap to get the dimension keys..

Usually, I see mapping used for getting say, the category from the product table.

I've read about how applymap can reduce the size of the document which I what I am hoping to achieve.

Thanks in advance.

Products:

MAPPING LOAD

  autonumber(product,'product') as productkey,

  product

;

SELECT

  product

FROM

  PRODUCTS

;

LOAD

  orderid,

  applymap('Products',product) as productkey,

  quantity

SELECT

  orderid,

  product,

  quantity

FROM

  ORDERS

;

2 Replies
vinieme12
Champion III
Champion III

I haven't ever tried this but test the reload time between the below and your script! i think the below will be faster!

LOAD

  orderid,

  autonumber(product,'product') as productkey,

  quantity

SELECT

  orderid,

  product,

  quantity

FROM

  ORDERS

;




Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
girirajsinh
Creator III
Creator III

You don't need to use ApplyMap.

Autonumber() would generate a unique key for Product for complete load. It improves the performance if you have e.g many distinct values for lengthy and complex field