Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hieeee...
appp:
LOAD eid,cid,name1,salary1
INLINE [
eid, cid, name1, salary1
1, 555, aa, 64754
2, 666, ss, 4553
3, 856, uu, 45
4, 559, tt, 56
5, 425, oo, 878
6, 578, jj, 369
];
This is my inline table and i want to add field in this by using apply map
and this is my mapping table...
map_appp:
LOAD * INLINE [
eid, sports
5, cricket
];
Hi,
Try this:
map_appp:
Mapping LOAD * INLINE [
eid, sports
5, cricket
];
appp:
LOAD eid,cid,name1,salary1, ApplyMap('map_appp', eid, 'NA') as sports
INLINE [
eid, cid, name1, salary1
1, 555, aa, 64754
2, 666, ss, 4553
3, 856, uu, 45
4, 559, tt, 56
5, 425, oo, 878
6, 578, jj, 369
];
map_appp:
mapping
LOAD * INLINE [
eid, sports
5, cricket
];
table:
LOAD
eid,cid,name1,salary1,
ApplyMap('map_appp', eid, 'no mapping found for ' & eid) as sports
INLINE [
eid, cid, name1, salary1
1, 555, aa, 64754
2, 666, ss, 4553
3, 856, uu, 45
4, 559, tt, 56
5, 425, oo, 878
6, 578, jj, 369
];
Hi Akash. Please look at the attached doc. Best regards. Andrea
Try to load your table like this way and put Mapping table before final table
map_appp:
Mapping LOAD * INLINE [
eid, sports
5, cricket
];
appp:
LOAD eid,cid,name1,salary1,
ApplyMap('map_appp',eid,'Other') as sports
Inline [
eid, cid, name1, salary1
1, 555, aa, 64754
2, 666, ss, 4553
3, 856, uu, 45
4, 559, tt, 56
5, 425, oo, 878
6, 578, jj, 369
];
You may also:
map_appp:
mapping LOAD * INLINE [
eid, sports
5, cricket
];
appp:
LOAD ApplyMap('map_appp',eid) as eid_desc, * INLINE [
eid, cid, name1, salary1
1, 555, aa, 64754
2, 666, ss, 4553
3, 856, uu, 45
4, 559, tt, 56
5, 425, oo, 878
6, 578, jj, 369
];
regards
Darek
Try to load your table like this way and put Mapping table before final table
See the attached Load Script