Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

help

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

];

6 Replies
Not applicable
Author

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

];

maxgro
MVP
MVP

1.png

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

];

anlonghi2
Creator II
Creator II

Hi Akash. Please look at the attached doc. Best regards. Andrea

its_anandrjs

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

];

Not applicable
Author

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

its_anandrjs

Try to load your table like this way and put Mapping table before final table

See the attached Load Script