ALTER MODEL¶

Modifies the properties for an existing model, including its name, tags, default version, or comment.

Three other variants of this command exist, namely:

Syntax¶

ALTER MODEL [ IF EXISTS ] <name> SET
  [ COMMENT = '<string_literal>' ]
  [ DEFAULT_VERSION = '<version_name>']

ALTER MODEL [ TAG <tag_name> = '<tag_value>' ]

ALTER MODEL [IF EXISTS] <model_name> UNSET TAG <tag_name> [ , <tag_name> ... ]
Copy

Parameters¶

name

Specifies the identifier (i.e. name) of the model.

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

For more information, see Identifier requirements.

SET ...

Specifies one or more model properties to be set.

COMMENT = 'string_literal'

Sets the comment of the model. This can also be done using the COMMENT command.

DEFAULT_VERSION = 'version_name'

Sets the default version of the model (the version that methods are invoked on when calling a method directly on the model). The version name is an identifier.

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.

UNSET TAG tag_name [ , tag_name ... ]

Specifies one or more tags to be unset on the model.

Access Control Requirements¶

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

OWNERSHIP

Model

A role must be granted or inherit the OWNERSHIP privilege on the object to create a temporary object that has the same name as the object that already exists in the schema.

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.