snowflake.core.procedure.ProcedureResource¶

class snowflake.core.procedure.ProcedureResource(name_with_args: Annotated[str, Strict(strict=True)], collection_class: ProcedureCollection)¶

Bases: ProcedureResourceBase

Represents a reference to a Snowflake procedure.

With this procedure reference, you can fetch information about a procedure, as well as perform certain actions on it.

Attributes

database¶

The DatabaseResource this reference belongs to.

fully_qualified_name¶

Return the fully qualified name of the object this reference points to.

root¶

The Root object this reference belongs to.

Methods

call(call_argument_list: CallArgumentList | None = None, extract: bool | None = False) → Any¶

Call this procedure.

Examples

Calling a procedure with no arguments using its reference:

>>> procedure_reference.call(call_argument_list=CallArgumentList(call_arguments=[]))
Copy

Calling a procedure with 2 arguments using its reference:

>>> procedure_reference.call(
...     call_argument_list=CallArgumentList(
...         call_arguments=[
...             CallArgument(name="id", datatype="NUMBER", value=1),
...             CallArgument(name="tableName", datatype="VARCHAR", value="my_table_name"),
...         ]
...     )
... )
Copy
call_async(call_argument_list: CallArgumentList | None = None, extract: bool | None = False) → PollingOperation[Any]¶

An asynchronous version of call().

Refer to PollingOperation for more information on asynchronous execution and the return type.

drop(if_exists: bool | None = None) → None¶

Delete a procedure.

Parameters:

if_exists (bool) – Parameter that specifies how to handle the request for a resource that does not exist: - true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - false: The endpoint throws an error if the resource doesn’t exist.

drop_async(if_exists: bool | None = None) → PollingOperation[None]¶

An asynchronous version of drop().

Refer to PollingOperation for more information on asynchronous execution and the return type.

fetch() → Procedure¶

Fetch a procedure.

fetch_async() → PollingOperation[Procedure]¶

An asynchronous version of fetch().

Refer to PollingOperation for more information on asynchronous execution and the return type.