SHOW VERSIONS IN LISTING¶
Lists and provides details of all listing versions.
- See also:
CREATE LISTING, ALTER LISTING, DESCRIBE LISTING, DROP LISTING
Syntax¶
SHOW VERSIONS IN LISTING <name>
[ LIMIT <rows> ]
Parameters¶
name
Specifies the listing identifier (name). 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.
LIMIT rows
Optionally limits the maximum number of rows returned, while also enabling “pagination” of the results. The actual number of rows returned might be less than the specified limit. For example, the number of existing objects is less than the specified limit.
Output¶
The output of the command includes the following columns, which describe the properties and metadata of the object:
Column |
Description |
---|---|
|
Date and time the version was created. |
|
The system generated name of the version. |
|
The user specified alias of the version. |
|
Full URL of the version, against which stage operations can be performed. |
|
Identifies the listing version that is published. |
|
Identifies if the version is a live version of the listing. |
|
Identifies if the version is the first listing version. |
|
Identifies if the version is the last listing version. |
|
Optional comments for the listing version. |
|
The source location URL where this version is created from. |
|
The git commit hash, if the version is created from a git source. |
Access control requirements¶
To show listing versions, you must be using a role that has USAGE or OWNERSHIP privileges on the listing.
Usage notes¶
The value for
LIMIT rows
can’t exceed10000
. IfLIMIT rows
is omitted, the command results in an error if the result set is larger than ten thousand rows.To view results for which more than ten thousand records exist, either include
LIMIT rows
or query the corresponding view in the Snowflake Information Schema.
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Examples¶
Show all versions of the MYLISTING listing:
SHOW VERSIONS IN LISTING MYLISTING
+-----------------------------------+------------------------------+------------------------------+-----------------------------------------------+--------------------+--------------------+--------------------+--------------------+---------------------------------------------+---------------------------------------+---------------------------------------+
| created_on | name | alias | location_uri | is_default | is_live | is_first | is_last | comment | source_location_uri | git_commit_hash |
+-----------------------------------+------------------------------+------------------------------+-----------------------------------------------+--------------------+--------------------+--------------------+--------------------+---------------------------------------------+---------------------------------------+---------------------------------------+
| 2025-01-08 11:18:39.921 -0800 | | | snow://listing/MYLISTING/versions/live/ | FALSE | TRUE | FALSE | FALSE | | @listingstage | |
| 2025-01-08 11:18:24.550 -0800 | VERSION$2 | | snow://listing/MYLISTING/versions/version$2/ | TRUE | FALSE | FALSE | TRUE | | @listingstage | |
| 2025-01-08 11:17:32.894 -0800 | VERSION$1 | | snow://listing/MYLISTING/versions/version$1/ | FALSE | FALSE | TRUE | FALSE | | @listingstage | |
+-----------------------------------+------------------------------+------------------------------+-----------------------------------------------+--------------------+--------------------+--------------------+--------------------+---------------------------------------------+---------------------------------------+---------------------------------------+