DESCRIBE DBT PROJECT¶
描述 :doc:` dbt 项目对象 </user-guide/data-engineering/dbt-projects-on-snowflake>` 的属性。
DESCRIBE 可以缩写为 DESC。
语法¶
{ DESC | DESCRIBE } DBT PROJECT <name>
参数¶
name指定要描述的 dbt 对象的标识符。
如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
有关更多信息,请参阅 标识符要求。
输出¶
命令的输出包括以下列,它们描述了对象的属性和元数据:
列 |
描述 |
|---|---|
|
dbt 项目对象的标识符(名称)。 |
|
用于创建 dbt 项目对象的角色。 |
|
与 dbt 项目对象相关的注释。 |
|
The default execution target (for example, |
|
The name of the external access integrations the dbt Project is permitted to use to pull remote dependencies from dbt package hub or Github. |
The following columns provide the value of a deprecated parameter:
|
The version of the dbt project object:
|
|---|---|
|
The version identifier in the form The version number begins at Snowflake increments the version identifier when you perform the following tasks:
Snowflake resets the version identifier to |
|
The custom version name alias that you created for a specific version of the dbt project object using the ALTER DBT PROJECT command with
the ADD VERSION option. A version name alias always maps to a specific version identifier, such as |
|
The location URI of the default version. This is read only. |
|
The location URI of the default version’s source files in its Git object. If the dbt project object is not connected to a Git object, this is null. |
|
The Snowflake version the dbt project object is on. |
访问控制要求¶
权限 |
对象 |
|---|---|
MONITOR |
dbt 项目 |
Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema.
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
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.
示例¶
以下示例描述了名为 my_dbt_project 的 dbt 项目对象:
DESCRIBE DBT PROJECT my_dbt_project;
+----------------+--------------+------------+-------------+-----------------+----------------------+-----------------------+---------------------------------------------------------------+-------------------------------------+-----------------------+----------------+------------------------------+
| name | owner | comment | dbt_version | default_version | default_version_name | default_version_alias | default_version_location_uri | default_version_source_location_uri | dbt_snowflake_version | default_target | external_access_integrations |
+----------------+--------------+------------+-------------+-----------------+----------------------+-----------------------+---------------------------------------------------------------+-------------------------------------+-----------------------+----------------+------------------------------+
| my_dbt_project | ACCOUNTADMIN | My comment | 1.9.4b | LAST | VERSION$1 | null | snow://dbt/MY_DB.MY_SCHEMA.my_dbt_project/versions/version$1/ | @s1 | null | dev | null |
+----------------+--------------+------------+-------------+-----------------+----------------------+-----------------------+---------------------------------------------------------------+-------------------------------------+-----------------------+----------------+------------------------------+