Documentation
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

UPDATE_SETTING

Stored procedure UPDATE_SETTING is a Snowflake SQL stored procedure that allows users to update value of Snowflake settings.

This procedure is defined in the database SUNDECK (database where Snowflake NativeApp is installed) schema ADMIN. ACCOUNTADMIN privilege is required to run this stored procedure.

See also:
DESCRIBE_SETTING

Syntax

UPDATE_SETTING(<setting_name>, 
	       <setting_value>)

Arguments

<setting_name>
display Snowflake setting.

Supported settings are:

compute_credit_cost
serverless_credit_cost
storage_cost
default_timezone
Setting names are case sensitive.
<setting_value>
string that represents setting values. For numeric values, strings will be implicitly converted to numeric type.

List of supported timezones for the reference:

UTC
America/New_York
America/Chicago
America/Denver
America/Los_Angeles
Pacific/Honolulu
America/Phoenix
America/Indianapolis
America/Detroit
America/Toronto
America/Indiana/Indianapolis
America/Indiana/Knox
America/Indiana/Petersburg
America/Indiana/Tell_City
America/Indiana/Vevay
America/North_Dakota/Center
America/Sao_Paulo
Brazil/East
Canada/Eastern
Canada/Central
Europe/London
Europe/Paris
Europe/Berlin
Europe/Rome
Europe/Madrid
Europe/Warsaw
Europe/Athens
Europe/Prague
Europe/Amsterdam
Europe/Stockholm
Europe/Vienna
Europe/Dublin
Europe/Helsinki
Europe/Zurich
Asia/Tokyo
Asia/Hong_Kong
Asia/Singapore
Asia/Seoul
Asia/Shanghai
Asia/Taipei
Asia/Bangkok
Asia/Kolkata
Asia/Dubai
Asia/Jakarta
Asia/Kuala_Lumpur
Australia/Sydney

Returns

NULL
in case when setting was updated successfully.
<error>
error message string in the case of failure to update setting.

Example:

coral#COMPUTE_WH@SUNDECK.ADMIN>call update_setting('storage_cost', 1.52);
+----------------+                                                              
| UPDATE_SETTING |
|----------------|
|                |
+----------------+
1 Row(s) produced. 

coral#COMPUTE_WH@SUNDECK.ADMIN>call describe_setting('storage_cost');
+------------------+                                                            
| DESCRIBE_SETTING |
|------------------|
| 1.52             |
+------------------+
1 Row(s) produced. 

coral#COMPUTE_WH@SUNDECK.ADMIN>call update_setting('storage_cost', 'abc');
+---------------------------------------------------------------------+         
| UPDATE_SETTING                                                      |
|---------------------------------------------------------------------|
| Failed to update setting: Expected float for storage_cost (got str) |
+---------------------------------------------------------------------+
1 Row(s) produced. 

coral#COMPUTE_WH@SUNDECK.ADMIN>call update_setting('default_timezone', 'Australia/Sydney');
+----------------+                                                              
| UPDATE_SETTING |
|----------------|
|                |
+----------------+
1 Row(s) produced. 

coral#COMPUTE_WH@SUNDECK.ADMIN>call describe_setting('default_timezone');
+------------------+                                                            
| DESCRIBE_SETTING |
|------------------|
| Australia/Sydney |
+------------------+
1 Row(s) produced.