Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
t1:
mapping LOAD [stud id],
marks
t2:
LOAD [stud id],
class,
ApplyMap('t1',[stud id],'man') as marks,
year,
grade
pls write map using syntex for above senario..................................................
CountryNamesMap:
MAPPING LOAD * INLINE [
ShortName, LongName
ES, Spain
US, United States
];
MAP CountryCode USING CountryNamesMap;
Data:
LOAD * INLINE [
CountryCode
ES
UK
US
];
Try this !!
t1:
mapping LOAD * inline
[ stud id, man
A,1
B,2
C,3
E,4
D,5
]
;
t2:
LOAD
ApplyMap('t1',[stud id]) as marks
FROM
[161209.xlsx]
(ooxml, embedded labels, table is Sheet2);
Hi,
You can write
MAP [stud id] USING t1;
Regards,
Jagan.
t1:
mapping LOAD
[stud id],
marks
t2:
LOAD [stud id],
class,
ApplyMap('t1',[stud id]) as marks,
year,
grade
mapping:is used for avoid the joins in script why because mapping performence is more efficient than join by using joins script execution is slow comparing to mapping ...so maximum realtime experts use mapping..but mapping has some drawback that is only 2 fields can only in mapping table and 1 field name must be same.
HI Kumar ,
small change in your script check out this ..
t1:
mapping LOAD [stud id],
marks
t2:
LOAD [stud id],
class,
ApplyMap('t1',[stud id],null()) as marks,
year,
grade