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

# SQL Catalog

> Understand how SQL Catalog connects Pulsar and Kafka clusters to a SQL Workspace.

A SQL Catalog connects one StreamNative Pulsar or Kafka cluster to a SQL Workspace. The catalog appears as a database in the SQL Workspace engine and makes eligible cluster topics available as source objects.

## Automatic database mapping

Each SQL Catalog automatically maps its target cluster to one database in the SQL Workspace engine. Within that database, StreamNative maps each eligible topic to a specific schema and managed source:

| Source system | Database | Schema | Queryable SQL object |
| - | - | - | - |
| Pulsar | SQL Catalog name | Full Pulsar tenant and namespace, such as `public/default` | Source named after the local topic name |
| Kafka | SQL Catalog name | `public` | Source named after the Kafka topic name |

A managed source is queryable in the SQL `FROM` position like a table, but it remains a source object. SQL Catalog does not automatically create user tables or materialized views.

Use the exact mapped schema and source names shown in SQL Studio and enclose them in double quotes:

```sql theme={null}
SELECT *
FROM "public/default"."orders-topic"
LIMIT 100;
```

For identifier limits, quoting behavior, and user-created object conventions, see [Naming Rules](/sql/overview/naming-rules).

## Source discovery

After a SQL Catalog becomes ready, StreamNative periodically discovers eligible topics from the connected cluster and creates missing source objects in the target database. Use these sources as inputs for queries, tables, and materialized views.

Eligibility and supported schemas differ between Pulsar and Kafka. For the complete behavior, see [Source Discovery](/sql/overview/source-discovery).

## Catalog lifecycle

You can add a SQL Catalog while creating a workspace or import a cluster later. Wait for the catalog to report **Ready**, then allow time for topic discovery if an eligible source is not visible immediately.

Removing a SQL Catalog stops topic discovery and stops its managed sources from consuming newly published records. Data that the SQL Workspace engine already ingested or processed is retained. Removing a catalog does not delete or change the source Pulsar or Kafka cluster. See [Data Retention](/sql/operations/data-retention).


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