Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Over clarification in Piggy Bank


How to apply rows between unbounded preceding and unbounded following in Pig?

Currently, I am using below code calculate the cumulative sum:

A = load 'T' AS (si:chararray, i:int, d:long, f:float, s:chararray);
 C = foreach (group A by si) {
     Aord = order A by d;
     generate flatten(Stitch(Aord, Over(Aord.f, 'sum(float)')));
 D = foreach C generate s, $5;This is equivalent to the SQL statement
select s, sum(f) over (partition by si order by d) from T;

I know I need to modify the Over(Aord.f, 'sum(float)' clause but not sure what exactly I need to do?



Hi Experts

Any Input on my clarifications?