Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
;
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
;
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