DESCRIBE GIT REPOSITORY¶
描述现有的 Snowflake Git 存储库克隆。
- 另请参阅:
ALTER GIT REPOSITORY、CREATE GIT REPOSITORY、DROP GIT REPOSITORY、SHOW GIT BRANCHES、SHOW GIT REPOSITORIES、SHOW GIT TAGS
语法¶
{ DESC | DESCRIBE } GIT REPOSITORY <name>
参数¶
name
指定要描述的 Git 存储库克隆的标识符。
如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
有关更多信息,请参阅 标识符要求。
输出¶
命令输出在以下列中包含属性:
列 |
描述 |
---|---|
|
Git 存储库克隆的创建日期。 |
|
Git 存储库克隆的名称。 |
|
包含此 Git 存储库克隆的数据库的名称。 |
|
包含此 Git 存储库克隆的架构的名称。 |
|
远程 Git 存储库来源的 URL。 |
|
该 Git 存储库克隆包含的 API 集成的名称。 |
|
该 Git 存储库克隆中密钥对象的名称。 |
|
创建此 Git 存储库克隆时使用的角色。 |
|
拥有对象的角色的类型(ROLE 或 DATABASE_ROLE)。 |
|
在创建该 Git 存储库克隆时指定的注释。 |
访问控制要求¶
权限 |
对象 |
备注 |
---|---|---|
OWNERSHIP |
Git 存储库 |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with 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.
示例¶
以下示例生成 snowflake_extensions
Git 存储库克隆的描述:
DESCRIBE GIT REPOSITORY snowflake_extensions;
上述命令生成如下输出:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| CREATED_ON | NAME | DATABASE_NAME | SCHEMA_NAME | ORIGIN | API_INTEGRATION | GIT_CREDENTIALS | OWNER | OWNER_ROLE_TYPE | COMMENT |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 2023-06-28 08:46:10.886 -0700 | SNOWFLAKE_EXTENSIONS | MY_DB | MAIN | https://github.com/my-account/snowflake-extensions.git | GIT_API_INTEGRATION | MY_DB.MAIN.GIT_SECRET | ACCOUNTADMIN | ROLE | |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------