snowflake.snowpark.Session.table_function¶
- Session.table_function(func_name: str | List[str] | TableFunctionCall, *func_arguments: ColumnOrName, **func_named_arguments: ColumnOrName) DataFrame[source]¶
Creates a new DataFrame from the given snowflake SQL table function.
References: Snowflake SQL functions.
- Example 1
Query a table function by function name:
- Example 2
Define a table function variable and query it:
- Example 3
If you want to call a UDTF right after it’s registered, the returned
UserDefinedTableFunctionis callable:
- Parameters:
func_name – The SQL function name.
func_arguments – The positional arguments for the SQL function.
func_named_arguments – The named arguments for the SQL function, if it accepts named arguments.
- Returns:
A new
DataFramewith data from calling the table function.
See also
DataFrame.join_table_function(), which lateral joins an existingDataFrameand a SQL function.Session.generator(), which is used to instantiate aDataFrameusing Generator table function.Generator functions are not supported with
Session.table_function().