> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# catalog

> Returns the name of the current catalog.

Returns the name of the current catalog. The catalog can be a database internal catalog or an external catalog that is mapped to an external data source. For more information about catalogs, see [Catalog overview](/documents/4.2/data_source/catalog/catalog_overview.md).

If no catalog is selected, the database internal catalog `default_catalog` is returned.

## Syntax

```Haskell theme={null}
catalog()
```

## Parameters

This function does not require parameters.

## Return value

Returns the name of the current catalog as a string.

## Examples

Example 1: The current catalog is the database internal catalog `default_catalog`.

```plaintext theme={null}
select catalog();
+-----------------+
| CATALOG()       |
+-----------------+
| default_catalog |
+-----------------+
1 row in set (0.01 sec)
```

Example 2: The current catalog is an external catalog `hudi_catalog`.

```sql theme={null}
-- Switch to an external catalog.
set catalog hudi_catalog;

-- Return the name of the current catalog.
select catalog();
+--------------+
| CATALOG()    |
+--------------+
| hudi_catalog |
+--------------+
```

## See also

[SET CATALOG](/documents/4.2/sql-reference/sql-statements/Catalog/SET_CATALOG.md): Switches to a destination catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.