共用方式為


描述目錄

適用於:檢查標示為是Databricks SQL 檢查標示為是 Databricks Runtime 10.4 LTS 和更新版本檢查標示為是僅限 Unity 目錄

傳回現有目錄的元數據。 元數據資訊包括目錄名稱、批注和擁有者。 如果指定了選擇性 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