SHOW GIT TAGS¶
列出指定的 Snowflake Git 存储库克隆 中的标签。
- 另请参阅:
ALTER GIT REPOSITORY、CREATE GIT REPOSITORY、DESCRIBE GIT REPOSITORY、DROP GIT REPOSITORY、SHOW GIT BRANCHES、SHOW GIT REPOSITORIES
语法¶
SHOW GIT TAGS [ LIKE '<pattern>' ] IN [ GIT REPOSITORY ] <repository_name>
参数¶
LIKE 'pattern'(可选)按对象名称筛选命令输出。筛选器使用 不区分大小写 的模式匹配,并支持 SQL 通配符(
%和_)。例如,以下模式返回 相同的 结果:
... LIKE '%testing%' ...... LIKE '%TESTING%' .... 默认:无值(不对输出应用筛选)。
IN [ GIT REPOSITORY ] repository_name指定包含要显示的标记的 Git 存储库克隆。
输出¶
命令输出在以下列中提供 Git 标签属性:
列 |
描述 |
|---|---|
|
标签的名称。 |
|
标签的路径。 |
|
提交标签的哈希值。 |
|
标签的作者。 |
|
标签的提交消息。 |
访问控制要求¶
权限 |
对象 |
备注 |
|---|---|---|
READ |
Git 存储库 |
包含要显示的标签的 Git 存储库克隆 |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on that schema.
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
该命令不需要正在运行的仓库即可执行。
该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。
MANAGE GRANTS 访问权限隐式允许其持有者查看账户中的每个对象。默认情况下,只有账户管理员(具有 ACCOUNTADMIN 角色的用户)和安全管理员(具有 SECURITYADMIN 角色的用户)才具有 MANAGE GRANTS 权限。
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.
示例¶
以下示例列出了 Git 存储库克隆 snowflake_extensions 中的标签。
SHOW GIT TAGS IN snowflake_extensions;
上述命令生成如下输出:
-----------------------------------------------------------------------------------------------------------------------------------------------
| name | path | commit_hash | author | message |
-----------------------------------------------------------------------------------------------------------------------------------------------
| example | /tags/example | 16e262d401297cd097d5d6c266c80ff9f7e1e4be | Gladys Kravits (gladyskravits@example.com) | Example code for preview. |
-----------------------------------------------------------------------------------------------------------------------------------------------