SHOW-CATALOGS
提示
该功能自 Apache Doris 1.2 版本起支持
SHOW-CATALOGS
Name
SHOW CATALOGS
Description
该语句用于显示已存在是数据目录(catalog)
语法:
SHOW CATALOGS [LIKE]
说明:
LIKE:可按照 CATALOG 名进行模糊查询
返回结果说明:
- CatalogId:数据目录唯一 ID
- CatalogName:数据目录名称。其中 internal 是默认内置的 catalog,不可修改。
- Type:数据目录类型。
- IsCurrent: 是否为当前正在使用的数据目录。
Example
查看当前已创建的数据目录
SHOW CATALOGS;
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
| CatalogId | CatalogName | Type | IsCurrent | CreateTime | LastUpdateTime | Comment |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
| 130100 | hive | hms | | 2023-12-25 16:11:41.687 | 2023-12-25 20:43:18 | NULL |
| 0 | internal | internal | yes | UNRECORDED | NULL | Doris internal catalog |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
```按照目录名进行模糊搜索
SHOW CATALOGS LIKE 'hi%';
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
| CatalogId | CatalogName | Type | IsCurrent | CreateTime | LastUpdateTime | Comment |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
| 130100 | hive | hms | | 2023-12-25 16:11:41.687 | 2023-12-25 20:43:18 | NULL |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
```
Keywords
SHOW, CATALOG, CATALOGS