DESCRIBE CODE BUNDLE¶
Describes the properties of a Code Bundle, including its versions and the source that backs it.
DESCRIBE can be abbreviated to DESC.
Syntax¶
Parameters¶
nameSpecifies the identifier of the Code Bundle to describe.
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.
Output¶
The output of the command includes the following columns, which describe the properties and metadata of the object:
| Column | Description |
|---|---|
name | Name of the Code Bundle. |
comment | Comment for the Code Bundle. |
default_version | The version that runs use when they call the Code Bundle by name, for example LAST. |
default_version_name | Name of the default version. |
default_version_alias | Alias of the default version. |
default_version_location_uri | Location of the default version’s files, in the form snow://code bundle/.... |
default_version_source_location_uri | Stage or workspace path that the default version was created from. |
default_version_git_commit_hash | Git commit hash of the default version, if its source is backed by a Git repository. |
last_version_name | Name of the most recently added version. |
last_version_alias | Alias of the most recently added version. |
last_version_location_uri | Location of the most recently added version’s files. |
last_version_source_location_uri | Stage or workspace path that the most recently added version was created from. |
last_version_git_commit_hash | Git commit hash of the most recently added version, if its source is backed by a Git repository. |
live_version_location_uri | Location of the live version, if the Code Bundle has one. |
created_on | Date and time when the Code Bundle was created. |
owner_role | Role that owns the Code Bundle. |
owner_role_type | Type of role that owns the Code Bundle. |
container_type | Type of the object that holds the Code Bundle’s source, for example Stage. |
container_database | Database of the object that holds the Code Bundle’s source. |
container_schema | Schema of the object that holds the Code Bundle’s source. |
container_name | Name of the object that holds the Code Bundle’s source. |
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
| Privilege | Object | Notes |
|---|---|---|
| USAGE or OWNERSHIP | Code Bundle |
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.
Usage notes¶
-
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.For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.
When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column
type, specifySELECT "type".You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
Examples¶
Describe a Code Bundle:
Find the source location of the version that runs use: