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

snowflake.snowpark.functions.table_function

snowflake.snowpark.functions.table_function(function_name: str) Callable[source]

Create a function object to invoke a Snowflake table function.

Parameters:

function_name – The name of the table function.

Example::
>>> from snowflake.snowpark.functions import lit
>>> split_to_table = table_function("split_to_table")
>>> session.table_function(split_to_table(lit("split words to table"), lit(" ")).over()).collect()
[Row(SEQ=1, INDEX=1, VALUE='split'), Row(SEQ=1, INDEX=2, VALUE='words'), Row(SEQ=1, INDEX=3, VALUE='to'), Row(SEQ=1, INDEX=4, VALUE='table')]
Copy