SHOW VERSIONS IN MODEL

Lists the versions in a machine learning model. Models may have multiple versions, one of which must be designated as the default (see ALTER MODEL).

The output returns table metadata and properties, ordered lexicographically by database, schema, and model name (see Output in this topic for descriptions of the output columns). This is important to note if you wish to filter the results using the provided filters.

See also:

CREATE MODEL , DROP MODEL , ALTER MODEL, SHOW MODELS

Syntax

SHOW VERSIONS [ LIKE '<pattern>' ] IN MODEL <model_name>
Copy

Parameters

LIKE 'pattern'

Optionally filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (% and _).

For example, the following patterns return the same results:

... LIKE '%testing%' ...
... LIKE '%TESTING%' ...

. Default: No value (no filtering is applied to the output).

IN MODEL model_name

Specifies the identifier of the model that contains the versions to be listed. If the identifier contains spaces, special characters, or mixed-case characters, the entire identifier must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive (e.g. "My Object").

If the model identifier is not fully-qualified (in the form of db_name.schema_name.model_name or schema_name.model_name), the command looks for the model in the current schema for the session.

Output

The command output provides table properties and metadata in the following columns:

Column

Description

created_on

Date and time when the model version was created.

name

Name of the version.

aliases

Aliases of the model version, if any, including any you have assigned using ALTER MODEL and any system aliases (DEFAULT, FIRST, or LAST) that apply. If a model version has no aliases, this column contains an empty ARRAY ([]).

database_name

Database in which the version is stored.

schema_name

Schema in which the version is stored.

model_name

Name of the model that this version belongs to.

is_default_version

Boolean value indicating whether this version is the model’s default version.

functions

JSON array of the names of the functions available in this version.

metadata

JSON object containing metadata as key-value pairs ({} if no metadata is specified).

user_data

JSON object from the user_data section of the model definition manifest ({} if no user data is specified).

Language: English