DESCRIBE CATALOG

适用于: 勾选“是” Databricks SQL 勾选“是” Databricks Runtime 10.4 LTS 及更高版本 勾选“是” 仅 Unity Catalog

返回现有目录的元数据。 元数据信息包括目录名称、注释和所有者。 如果指定了可选的 EXTENDED 选项,则它将返回基本元数据信息以及其他目录属性。

语法

{ DESC | DESCRIBE } CATALOG [ EXTENDED ] catalog_name

参数

  • catalog_name:元存储中现有目录的名称。 如果该名称不存在,则会引发异常。

示例

> DESCRIBE CATALOG main;
 info_name     info_value
 ------------ ------------------------------------
 Catalog Name                                  main
      Comment           Main catalog (auto-created)
        Owner                 metastore-admin-users
 Catalog Type                               Regular

> DESCRIBE CATALOG EXTENDED main;
 info_name     info_value
 ------------ ------------------------------------
 Catalog Name                                  main
      Comment  This is a reserved catalog in Spark.
      Comment           Main catalog (auto-created)
        Owner                 metastore-admin-users
 Catalog Type                               Regular
   Created By
   Created At
   Updated By
   Updated At

-- A catalog from a Delta Sharing share
> DESCRIBE CATALOG vaccinedata;
 info_name     info_value
 ------------ ------------------------------------
 Catalog Name                           vaccinedata
      Comment
        Owner            alwaysworks@databricks.com
 Catalog Type                         Delta Sharing