Lead/Lag allows the user to determine a value from a preceding or following row at a given offset within a group (or partition) of values. This component uses a Snowflake window function.
Name = string
A human-readable name for the component.
Include Input Columns = boolean
When Yes, the component passes all input columns into the output.
Partition Data = dual listbox
Defines how the input data is partitioned to perform the rank calculation. The calculation is then performed on each partition.
Orderings Within Partitions = column editor
- Input Column: The input column name for sorting within the partitioned data. You can drag columns to reorder them.
- Ordering: The order of the sorting: Ascending, Descending, Nulls first, or Nulls Last.
Functions = column editor
- Window Function:
- Input Column: The name of the input column that the lead/lag function will return.
- Offset: The number of rows to go forward (lead) or backwards (lag) in the partition.
- Output Column: The name of the output column that the window function will create.
Ingore Nulls = boolean
When Yes, disregard null values when determining which row to use. Null values do not count toward reaching the offset.