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: 
shiveshsingh
Master
Master

ApplyMap Question

please let me know the error in below applymap

TableName:

LOAD

    F1,

    F2,

    RangeSum(F2, Peek('CumSum')) AS CumSum;

E: MAPPING LOAD * INLINE [

    F1, F2

    a, 100

    b, 200

    c, 300

    d, 400

];

load ApplyMap('E',F2) AS Y

INLINE

[F2,F5

100,2

400,5];

5 Replies
sunny_talwar

Where is table E you are applymapping from?

load ApplyMap('E',F2) AS Y

INLINE

[F2,F5

100,2

400,5];

shiveshsingh
Master
Master
Author

here it is..

E: MAPPING LOAD * INLINE [

    F1, F2

    a, 100

    b, 200

    c, 300

    d, 400

];

sunny_talwar

I see it now... it was hidden under your TableName table.... you are using E for Mapping and as a preceding load for TableName? You cannot do that....


Also, you need to have the F2 field before F1 for mapping to work properly

sunny_talwar

May be this is what you need

E:

MAPPING

LOAD * INLINE [

    F1, F1

    100, a

    200, b

    300, c

    400, d

];

TableName:

LOAD

    F1,

    F2,

    RangeSum(F2, Peek('CumSum')) AS CumSum;

LOAD * INLINE [

    F1, F2

    a, 100

    b, 200

    c, 300

    d, 400

];

 

LOAD ApplyMap('E',F2) as Y

INLINE

[F2,F5

100,2

400,5];

shiveshsingh
Master
Master
Author

done..thnks