snowflake.snowpark.Window.rows_between

static Window.rows_between(start: Union[int, WindowRelativePosition], end: Union[int, WindowRelativePosition]) WindowSpec[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/window.py#L141-L164)

Returns a WindowSpec object with the row frame clause.

Parameters:
  • start – The relative position from the current row as a boundary start (inclusive). The frame is unbounded if this is Window.UNBOUNDED_PRECEDING, or any value less than or equal to -9223372036854775807 (-sys.maxsize).

  • end – The relative position from the current row as a boundary end (inclusive). The frame is unbounded if this is Window.UNBOUNDED_FOLLOWING, or any value greater than or equal to 9223372036854775807 (sys.maxsize).

Note

You can use Window.UNBOUNDED_PRECEDING, Window.UNBOUNDED_FOLLOWING, and Window.CURRENT_ROW to specify start and end, instead of using integral values directly.

Language: English