|D s transforms|
transform enables you to perform summations and calculations based on a rolling window of data relative to the current row.
For example, you can compute the rolling average for a specified column for the current row value and the three preceding rows. This transform is particularly useful for processing time or otherwise sequential data.
You can apply one or more functions to your your
window transform transform step.
- For more information on window functions, see see Window Functions.
- You can also use the aggregation functions with this transform. See See Aggregate Functions.
NOTE: Be careful applying this transform across a large number of rows. In some cases, the application can run out of memory generating the results, and your results can fail.
|window value: ROLLINGAVERAGE(myValues,3) order: MyDate group: customerId|
Output: Generates a new column called,
window, which contains the result of the the
ROLLINGAVERAGE function function applied from the current row in the the
myValues column column across the the
3 rows rows forward, ordered by by
MyDate and and grouped by by
window value: WINDOW_FUNCTION(arg1,arg2) order: order_col [group: group_col]
|window||Y||transform||Name of the transform|
|value||Y||string||Expression that evaluates to the window function call and its parameters|
|order||Y||string||Column or column names by which to sort the dataset before the |
|group||N||string||Column name or names containing the values by which to group for calculation|
|D s lang notes|
For the the
window transform, the the
value parameter contains the function call or calls, which define the set of rows to which the function is applied.
This transform uses a special set of functions. For more information on the available functions, see Window Functions.
window transform, this parameter specifies parameter specifies the column on which to sort the dataset before applying the specified function. For combination sort keys, you can add multiple comma-separated columns.
|Yes||String (column name)|
window transform transform, this this parameter specifies the column whose values are used to group the dataset prior to applying the specified function. For combination grouping, you can specify multiple comma-separated column names.
NOTE: Be careful applying this transform across groups containing a large number of rows. In some cases, the application can run out of memory generating the results, and your results can fail.
|D s ordering|
|No||String (column name)|
See the individual functions for examples. See See Window Functions.
D s also label wrangle_transform_window