snowflake.snowpark.Session.call¶
- Session.call(sproc_name: str, *args: Any, statement_params: Optional[Dict[str, Any]] = None, block: bool = True, log_on_exception: bool = False, return_dataframe: Optional[bool] = None) Union[Any, AsyncJob][source]¶
Calls a stored procedure by name.
- Parameters:
sproc_name – The name of stored procedure in Snowflake.
args – Arguments should be basic Python types.
statement_params – Dictionary of statement level parameters to be set while executing this action.
block – Whether to block until the result is available. When it is
False, this function executes the stored procedure asynchronously and returns anAsyncJob.log_on_exception – Log warnings if they arise when trying to determine if the stored procedure as a table return type.
return_dataframe – When set to True, the return value of this function is a DataFrame object. This is useful when the given stored procedure’s return type is a table.
- Returns:
The stored procedure result (scalar value or DataFrame) When block=False: An AsyncJob object for retrieving results later
- Return type:
When block=True
Example:
Example: