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

snowflake.snowpark.functions.call_table_function

snowflake.snowpark.functions.call_table_function(function_name: str, *args: Union[Column, None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, list, tuple, dict], **kwargs: Union[Column, None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, list, tuple, dict]) TableFunctionCall[source]

Invokes a Snowflake table function, including system-defined table functions and user-defined table functions.

It returns a TableFunctionCall() so you can specify the partition clause.

Parameters:
  • function_name – The name of the table function.

  • args – The positional arguments of the table function.

  • **kwargs – The named arguments of the table function. Some table functions (e.g., flatten) have named arguments instead of positional ones.

Example::
>>> from snowflake.snowpark.functions import lit
>>> session.table_function(call_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