SHOW VERSIONS IN DBT PROJECT¶
Displays a list of all versions of a dbt project object.
- See also:
ALTER DBT PROJECT, DESCRIBE DBT PROJECT, EXECUTE DBT PROJECT, SHOW DBT PROJECTS, DROP DBT PROJECT
Syntax¶
SHOW VERSIONS IN DBT PROJECT <name>
[ LIMIT <number> ]
Parameters¶
nameString that specifies the identifier (that is, the name) for the dbt project object within Snowflake; must be unique for the schema in which the dbt project is created.
In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example,
"My object"). Identifiers enclosed in double quotes are also case-sensitive.For more information, see Identifier requirements.
LIMIT rowsOptionally limits the maximum number of rows returned. 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.
Default: No value (no limit is applied to the output).
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
Privilege |
Object |
|---|---|
USAGE |
The dbt project object |
MONITOR |
The dbt project object |
OWNERSHIP |
The dbt project object |
Usage notes¶
The command doesn’t require a running warehouse to execute.
The command only returns objects for which the current user’s current role has been granted at least one access privilege.
The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is
type, then specify"type"for the identifier.
Output¶
The command output provides table properties and metadata about versions of dbt Projects in the following columns:
Column |
Description |
|---|---|
|
Date and time when the dbt project object was created. |
|
The auto-assigned name of the dbt project version. For example, |
|
The alias for the dbt Project you assigned (for example, |
|
Full URL of the dbt project version. |
|
TRUE if the default version of the dbt project object points to this version. |
|
TRUE if the dbt project version is a live version of the listing. |
|
TRUE if the dbt Project is the first version. |
|
TRUE if the dbt Project is the last version. |
|
Comment set on the dbt Project. |
|
The source location URI where this dbt project version is created from. |
|
The git commit hash, if the dbt project version was created from a git source. |
Examples¶
Show all versions of my_dbt_project:
SHOW VERSIONS IN DBT PROJECT my_dbt_project;
+---------------------------------+-----------+-------+----------------------------------------------------------------------+------------+---------+----------+---------+---------+---------------------+-----------------+
| 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:24.550 -0800 | VERSION$2 | null | snow://dbtproject/mydb.my_schema.my_dbt_project/versions/version$2/ | TRUE | FALSE | FALSE | TRUE | null | null | null |
| 2025-01-08 11:17:32.894 -0800 | VERSION$1 | null | snow://dbtproject/mydb.my_schema.my_dbt_project/versions/version$2/ | FALSE | FALSE | TRUE | FALSE | null | null | null |
+---------------------------------+-----------+------------------------------+-----------------------------------------------+------------+--------------------+---------+---------+---------------------+-----------------+