-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Milestone
Description
What needs to be done?
Currently, window functions in Flow ETL operate on the entire partition:
// Current: AVG operates on entire partition
df()->withEntry('avg_salary', average(ref('salary'))->over(
window()->partitionBy(ref('department'))
));
// Result: Each row gets the average of ALL rows in its departmentFrames allow more granular control:
// With frame: AVG of last 3 rows (moving average)
df()->withEntry('moving_avg', average(ref('salary'))->over(
window()
->partitionBy(ref('department'))
->orderBy(ref('date'))
->rowsBetween(-2, 0) // 2 preceding + current = 3 rows
));
// Result: Each row gets average of itself and 2 previous rowsMetadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo