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: 
niranjana
Creator
Creator

Applymap

Hi All, I have a requirement where I have to bring one filed from an excel file loaded into a QVD which also is loaded in the script. I used applymap function but its not working. The Key field used to join is not working. Any help is appreciated.

For example,

table1:

Load 

field1,

filed2 ,

field1 & field 2 as key,

field 3

etc  from  excel file;

mapping load:

key ,

field 3

resident table1;

table2:

load

field 1

field 2,

applymap('maping table',key,null()) as field 3

from QVD;

I want to bring field 3 into table2

6 Replies
anat
Master
Master

load

field1 & field 2 as key,

field 1

field 2,

applymap('maping table',key,null()) as field 3

from QVD;

niranjana
Creator
Creator
Author

Can you pls give full approx. script , for ex where should I put they "Key" field? in all three tables: table1, mapping load and table 2?

MarcoWedel

please post some sample data and your expected result.

thanks

anat
Master
Master

table1:

Load 

field1,

filed2 ,

field1 & field 2 as key,

field 3

etc  from  excel file;

mapping load:

key ,

field 3

resident table1;

table2:

load

field1 & field 2 as key,

field 1,

field 2,

applymap('maping table',key,null()) as field 3

from QVD;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Something is incomplete here. You show a reference to 'maping table' but don't show it loading in the script. 

-Rob

Vishal_Gupta
Partner - Creator
Partner - Creator

Hi @niranjana 

 

Problem with your script is that you are not defining correct mapping field in your 3rd table i.e. qvd table

While there can be multiple ways to handle this, you can try the below script and let me know if it works for you

Table1:
Load
field1,
filed2 ,
field1 & field2 as key,
field 3
etc from excel file;

Mapping Table:
mapping load
key,
field 3
resident Table1;

Table2:
load
field 1
field 2,
applymap('Maping Table',field1 & field2,null()) as field 3
from QVD;

 

Also note that mapping load table can only have unique values.

If a post helps to resolve your issue, please accept it as a SOLUTION and leave a LIKE!