snowflake.core.function.FunctionResource¶
- class snowflake.core.function.FunctionResource(name_with_args: Annotated[str, Strict(strict=True)], collection_class: FunctionCollection)¶
- Bases: - FunctionResourceBase- Represents a reference to a Snowflake function. - With this function reference, you can create and fetch information about functions, as well as perform certain actions on them. - 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 - drop(if_exists: bool | None = None) None¶
- Delete a function. - 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 - PollingOperationfor more information on asynchronous execution and the return type.
 - execute(input_args: list[Any] | None = None) Any¶
- Execute this function. - Parameters:
- input_args (list[Any], optional) – A list of arguments to pass to the function. The number of arguments must match the number of arguments the function expects. 
 - Examples - Executing a function using its reference: - >>> function_reference.execute(input_args=[1, 2, "word"]) 
 - execute_async(input_args: list[Any] | None = None) PollingOperation[Any]¶
- An asynchronous version of - execute().- Refer to - PollingOperationfor more information on asynchronous execution and the return type.
 - fetch_async() PollingOperation[Function]¶
- An asynchronous version of - fetch().- Refer to - PollingOperationfor more information on asynchronous execution and the return type.