VeloDB Cloud 26.x·Apache Doris 4.x (up to 4.0 supported)·"Since X.Y" tags refer to Apache Doris versionsVersion mapping
SHOW CATALOGS
Description
This statement is used for view created catalogs
Syntax
SHOW CATALOGS [LIKE <catalog_name>]
illustrate:
- LIKE: Fuzzy query can be performed according to the catalog name
Optional Parameters
1. <catalog_name>
The name of the catalog to be displayed.
Return Value
| Column Name | Description |
|---|---|
| CatalogId | Unique ID of the data catalog |
| CatalogName | Name of the data catalog. The default built-in catalog is named "internal" and cannot be modified. |
| Type | Type of the data catalog |
| IsCurrent | Indicates whether it is the currently active data catalog |
| CreateTime | Creation time |
| LastUpdateTime | Last updated time |
| Comment | comments about the catalog |
Access Control Requirements
| Privilege | Object | Notes |
|---|---|---|
| ADMIN_PRIV / SELECT_PRIV / LOAD_PRIV / ALTER_PRIV / CREATE_PRIV / SHOW_VIEW_PRIV / DROP_PRIV | Catalog | One of the above permissions is required. |
Examples
-
View the data catalogs that have been created currently
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 |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+ -
Fuzzy query by catalog name
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 |
+-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+