UPDATE_PACKAGE_VARIABLE_STATE_UDF

Definition

This user-defined function (UDF) updates the given package variable values. It is a wrapper for the Snowflake SETVARIABLE() function.

UPDATE_PACKAGE_VARIABLE_STATE_UDF (VARIABLE VARCHAR, NEW_VALUE VARCHAR)

Parameters

VARIABLE VARCHAR

The variable name to set the value.

NEW_VALUE VARCHAR

The value that will be stored.

Returns

Returns a varchar with the information of the updated variable.

Usage example

Please, review the existence of the variable.

Input:

CALL PUBLIC.UPDATE_PACKAGE_VARIABLE_STATE_UDF('MY_LOCAL_VARIABLE', '1');

Output:

1

Last updated