Window Calculation
Window Calculation allows the user to set up a calculation using a window function. Window functions operate on a specific subset ("window") of a data set.
Snowflake window functions documentation
Properties
Name
= string
A human-readable name for the component.
Include Input Columns
= boolean
Defines whether the component passes all input columns into the output. The default is Yes.
Partition Data
= dual listbox
Select the columns that will define how the input data is partitioned. The window calculation will be performed on each partition.
Ordering Within Partitions
= column editor
Select the columns that will be used to sort the partitioned data. For each column, select the sort order: Asc (sort ascending), Desc (sort descending), Nulls First (sort null values first), or Nulls Last (sort null values last). You can select multiple columns to create a complex sort. You can drag the selected columns to reorder the sort level if required.
Lower Bound
= drop-down
This property is visible after Ordering Within Partitions is set. Select which row of the partition the window calculation will start on. Options are: - unbounded preceding: The window starts at the first row of the partition. - current row: The window starts at the current row. - offset preceding: The window starts a number of rows (offset) before the current row. This requires you to set the Lower Bound Offset property.
Upper Bound
= drop-down
This property is visible after Ordering Within Partitions is set. Select which row of the partition the window calculation will end on. Options are: - unbounded following: The window ends at the last row of the partition. - current row: The window ends at the current row. - offset following: The window ends a number of rows (offset) after the current row. This requires you to set the Upper Bound Offset property.
Lower Bound Offset
= integer
If the Lower Bound property is set to offset preceding, enter the number of rows before the current row that the window will start on.
Upper Bound Offset
= integer
If the Upper Bound property is set to offset following, enter the number of rows after the current row that the window will end on.
Functions
= column editor
Select a Window Function to apply to be performed on the rows contained in the window. See the list of supported functions below. Multiple functions can be selected. For each function, select the Input Column that the function will act on and the Output Column that the result will be written to.