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

snowflake.snowpark.stored_procedure.StoredProcedure

class snowflake.snowpark.stored_procedure.StoredProcedure(func: Callable, return_type: DataType, input_types: List[DataType], name: str, execute_as: Literal['caller', 'owner'] = 'owner', anonymous_sp_sql: Optional[str] = None)[source]

Bases: object

Encapsulates a user defined lambda or function that is returned by sproc(), StoredProcedureRegistration.register() or StoredProcedureRegistration.register_from_file(). The constructor of this class is not supposed to be called directly.

Call an instance of StoredProcedure to invoke a stored procedure. The input should be Python literal values.

Attributes

func

The Python function.

name

The stored procedure name.