Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I mapped a field named XYZ using applymap function.
Now i need to use this field XYZ as a common field in another applymap function.
I am getting an error that field XYZ not found.
Kindly help.
Looks you need to use a preceding Load so the field ABC is created before you use it.
spm:
Load
applymap('map2',ABC,null()) as department ,
*
;
Load
ID,
Name,
applymap('map1',ID,null()) as ABC,
from file2;
Yup - As long you create the XYZ field before using it.
Kindly explain .
Can you post the log file of the failed reload then I can explain in the context of your load script.
map1:
Mapping Load
ID,
XYZ
from file1;
map2:
Mapping Load
P as ABC,
department
from file3;
spm:
ID,
Name,
applymap('map1',ID,null()) as ABC,
applymap('map2',ABC,null()) as department
from file2;
getting error on underlined ABC field.
Looks you need to use a preceding Load so the field ABC is created before you use it.
spm:
Load
applymap('map2',ABC,null()) as department ,
*
;
Load
ID,
Name,
applymap('map1',ID,null()) as ABC,
from file2;
is this load within load and in 1 table???
Have a look at this Blog Post Preceding Load by Henric and this one by https://www.quickintelligence.co.uk/preceding-load-qlikview/ by stevedark
QlikSense load scripts work the same as QlikView load scripts so the posts are valid for your scenario.
Preceding Loads are very useful and efficient.
Thanks a lot
Thanks for sharing my post Bill.
I've heard (though not benchmarked) that preceding loads are less efficient in Sense than QlikView, so I avoid them in some cases now.
However... the way they help you to keep your code tidy and remove duplication makes them well worth taking a bit of a performance hit on.