Skip to main content
Skip to main content

SHOW-CATALOGS

SHOW-CATALOGS​

Name​

SHOW CATALOGS

Description​

This statement is used for view created catalogs

Syntax:

SHOW CATALOGS [LIKE]

illustrate:

  1. LIKE: Fuzzy query can be performed according to the catalog name

Return result:

  • CatalogId: Unique ID of the catalog
  • CatalogName: Catalog name. where "internal" is the default built-in catalog, which cannot be modified.
  • Type: Catalog type.
  • IsCurrent: Show yes on the line of current using catalog.

Example​

  1. 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 |
    +-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
    ```

  2. 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 |
    +-----------+-------------+----------+-----------+-------------------------+---------------------+------------------------+
    ```

Keywords​

SHOW, CATALOG, CATALOGS

Best Practice​