🔹 Accumulations Concept
Accumulations is a process for:
➡️ adding up the values incrementally (running total) of two or more fields in a data stream.
So each record will carry the accumulated results of the previous record.
🔹 Parameter
- Accumulated Field
Field whose accumulation will be calculated (for example: views,likes).
🔹 Input & Output
- Input Field
All original fields of the data
- Output Field
- All input fields
- new field:accumulation
🔹 How it works
For example, there is input data:
id views likes
----------------
1 10 9
2 20 6
3 5 3
4 15 10
If we use Accumulator on the field views , then the result is:
id views likes accum_views accum_likes
----------------------------------------------------
1 10 9 10 9
2 20 6 30 15
3 5 3 35 18
4 15 10 50 28