ALTER APPLICATION

Modifies the properties of an installed Snowflake Native App. Use ALTER APPLICATION to upgrade an app to a specific version or patch. This command is also used to set other properties for an app.

See also:

CREATE APPLICATION, DESCRIBE APPLICATION, DROP APPLICATION, SHOW APPLICATIONS

Syntax

ALTER APPLICATION [ IF EXISTS ] <name> SET
  [ COMMENT = '<string-literal>' ]
  [ SHARE_EVENTS_WITH_PROVIDER = { TRUE | FALSE } ]
  [ DEBUG_MODE = { TRUE | FALSE } ]

ALTER APPLICATION [ IF EXISTS ] <name> UNSET
  [ COMMENT ]
  [ SHARE_EVENTS_WITH_PROVIDER ]
  [ DEBUG_MODE ]

 ALTER APPLICATION <name> UPGRADE

 ALTER APPLICATION <name> UPGRADE USING VERSION <version_name> [ PATCH <patch_num> ]

 ALTER APPLICATION <name> UPGRADE USING <path_to_stage>

 ALTER APPLICATION <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

 ALTER APPLICATION <name> UNSET TAG <tag_name> [ , <tag_name> ... ]

 ALTER APPLICATION <name> UNSET REFERENCES[ ( '<reference_name>' [ , '<reference_alias>' ] ) ]

 ALTER APPLICATION <name> SET SHARED TELEMETRY EVENTS ('<event_definition' [ , <event_definition>, ...])

 ALTER APPLICATION <name> SET AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE }
Copy

Parameters

name

Specifies the identifier for the application being altered. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

SET

Specifies one (or more) properties to set for the application (separated by blank spaces, commas, or new lines). For more details about the properties you can set, see CREATE APPLICATION.

COMMENT = '{string}'

Adds a comment or overwrites an existing comment for the application.

DEBUG_MODE = { TRUE | FALSE |

Enables or disables debug mode for the installed application.

  • TRUE enables debug mode for the installed application.

  • FALSE disables debug mode for the installed application.

You can only set DEBUG_MODE on the application if the following conditions are met:

  • The installed application is in the same account as the application package.

  • The installed application must have been created in development mode.

    Development mode is installed with an explicit stage, version, or patch.

  • You have OWNERSHIP privileges on the installed application and your role has been granted the DEVELOP privilege on the application package used to create the installed application.

SHARE_EVENTS_WITH_PROVIDER = { TRUE | FALSE }

Specifies whether to share logs and event data with the provider.

TAG tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ]

Specifies the tag name and the tag string value.

The tag value is always a string, and the maximum number of characters for the tag value is 256.

For information about specifying tags in a statement, see Tag quotas for objects and columns.

UPGRADE

Performs an application upgrade if the application provider has indicated that the instance should be upgraded.

An application will be automatically upgraded when the provider has indicated that it should do so, however this command may be used to cause the upgrade to take place immediately without waiting for automatic upgrade to take place. This command may only be used on non-development mode applications, which are installed from a listing or without specifying a stage or version, and is primarily intended to support testing of the application upgrade process.

UPGRADE USING VERSION version_name [ PATCH patch_num ]

Upgrades the application to the specified version. If patch_num is not specified, the latest patch is used. This command is only valid for applications that were installed by specifying a version and patch.

UPGRADE USING <path_to_version_directory>

Upgrades the application using files on a named stage at the path specified by path_to_stage.

This clause applies only if you installed the application from a named stage.

UNSET

Specifies one (or more) properties and/or session parameters to unset for the application, which resets them to the defaults.

You can reset multiple properties/parameters with a single ALTER statement; however, each property/parameter must be separated by a comma. When resetting a property/parameter, specify only the name; specifying a value for the property/parameter will return an error.

  • COMMENT

  • DEBUG_MODE Disables debug mode for the installed application. This clause is semantically the same as setting DEBUG_MODE = FALSE.

  • TAG tag_name [ , tag_name ... ]

  • REFERENCES[ ( 'reference_name' [, 'reference_alias' ] ) ]

    Unsets a persistent reference for an application. If no arguments are passed, unsets all persistent references set for the application.

SET SHARED TELEMETRY EVENTS ('<event_definition' [ , <event_definition>, ...])

Specifies the optional event definition to enable for an app.

SET AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE }

When set to TRUE, enables all required event definitions for an app. However, optional event definitions remain disabled. Use the SET SHARED TELEMETRY EVENTS clause to set optional event definitions for an app.

Caution

After setting this value to TRUE, you cannot reset the value back to FALSE if there are required event definitions in the app.

Usage notes

  • If you do not specify values for optional parameters, values for these parameters are taken from the manifest.yml file. If you specify values in both the manifest and when running the command, values specified in the command take precedence.

  • Regarding metadata:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.

Language: English