FUNCTION
Config path: /<database>/<schema>/function/<name>(<dtypes>).yaml
Example:
Schema
language (str) - language of function (default: SQL)
runtime_version (str) - used to specify version of Python, Java, etc.
arguments (dict)
{key} (ident) - argument name
{value} (dict)
default (str) - default SQL expression for optional argument
returns (str) - for single return value, return data type --- OR ---
returns (dict) - for table return values
{key} (ident) - return column name
{value} (str) - return column data type
body (str) - function body
is_secure (bool) - is function SECURE
is_aggregate (bool) - is function AGGREGATE
is_strict (bool) - is function STRICT (always returns NULL on NULL input)
is_immutable (bool) - is function IMMUTABLE (same input always produced the same output)
is_memoizable (bool)
imports (list) - files to import (usually JAR packages)
{items} (dict)
stage (ident) - name of stage
path (str) - path to file
packages (list) - Snowflake system packages to import as dependencies
{items} (str) - name of package, with optional version of package
handler (str) - name of class and method to be called
external_access_integrations (list)
secrets (dict)
{key} (str) - secret variable name used in function code
comment (str)
Usage notes
If function
body
is empty,handler
andimports
with pre-compiled JAR or Python code are required.runtime_version
should be specified as string with explicit double-quotes (e.g."3.8"
). Otherwise YAML parser may confuse it with number, which may cause some unwanted effects.
Links
Last updated