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, NaTType, float64, list, tuple, dict], **kwargs: Union[Column, None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, NaTType, float64, list, tuple, dict]) TableFunctionCall[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L8076-L8095)

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
语言: 中文