You are viewing documentation about an older version (1.12.1). View latest version

snowflake.snowpark.table_function.TableFunctionCall.over

TableFunctionCall.over(*, partition_by: Optional[Union[snowflake.snowpark.column.Column, str, Iterable[Union[snowflake.snowpark.column.Column, str]]]] = None, order_by: Optional[Union[snowflake.snowpark.column.Column, str, Iterable[Union[snowflake.snowpark.column.Column, str]]]] = None) TableFunctionCall[source]

Specify the partitioning plan for this table function call when you lateral join this table function.

When a query does a lateral join on a table function, the query feeds data to the table function row by row. Before rows are passed to table functions, the rows can be grouped into partitions. Partitioning has two main benefits:

  • Partitioning allows Snowflake to divide up the workload to improve parallelization and thus performance.

  • Partitioning allows Snowflake to process all rows with a common characteristic as a group. You can return results that are based on all rows in the group, not just on individual rows.

Refer to table functions and partitions for more information.

Parameters:
  • partition_by – Specify the partitioning column(s). It tells the table function to partition by these columns.

  • order_by – Specify the order by column(s). It tells the table function to process input rows with this order within a partition.

Note that if this function is called but both partition_by and order_by are None, the table function call will put all input rows into a single partition. If this function isn’t called at all, the Snowflake database will use implicit partitioning.