Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I am trying to do an apply map please tell me how do I use apply map correctly.
Table1:
Load
ID,
Field2,
Field3
;
TableMap:
Mapping Load
Name,
New ID
;
Table2:
Load
Name,
New ID,
Field5
;
applymap is like a decod or lookup
1) define a map table with 2 fields (first field for input, second for output, names of fields doesn't matter)
with mapping load
2) use ApplyMap('nameofmappingtable', inputfield) to get outputfield from inputfield;
if inputfield matches one value of first field in mapping table, you get the value of the second field in mapping table
MapTable:
mapping load * inline
[
from,to
1,a
2,b
3,c
4,d
];
Table1:
load
inputfield,
ApplyMap('MapTable', inputfield) as outputfield;
load * inline
[
inputfield
1
2
3
4
5
6
];
In Table2 you need to have
Applymap('TableMap',ID) as [New ID]
HIC