Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Apply map

Hello ,

I have a product table and order table.

table_1_map:

mapping load

product_id , order_id

resident order;

now i need to do applymap in product table to get the order_id also in the product table..

what i am doing is not giving me the right results

ApplyMap('table_1_map', product_id, 'order_id') as order_id1

please help me with what i am doing wrong

Thanks & Regards,

Jaya

5 Replies
sushil353
Master II
Master II

Hi,

Try this:

ApplyMap('table_1_map', product_id) as order_id1

HTH

Sushil

avinashelite

your syntax looks ok ...

ApplyMap('table_1_map', product_id, order_id) as order_id1


3rd parameter is a optional one , you could specify a column or a default value ..


can you share the sample data and results..and whats going wrong

effinty2112
Master
Master

Hello,

          Your line of code looks okay. Be careful in the join you create to add this field to the product table, remember to use a DISTINCT clause. Should be something like:

Left Join(Products)

LOAD

DISTINCT

product_id,

ApplyMap('table_1_map', product_id, 'order_id') as order_id1

Resident Products;


Gook luck


Andrew

Anonymous
Not applicable
Author

Hi,

Looks OK at first glance.

I have attached qvw file with a test, using your column names.

Maybe you can share your qvw file with us as well, so we can investigate further.

Regards,

Filip

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Can you send me sample qvw file?

Muthukumar Pandiyan