> ## 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.

# SQLCatalog

> Understand how SQLCatalog connects Pulsar and Kafka clusters to a SQLWorkspace.

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

## Automatic database mapping

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

| Source system | Database        | Schema                                                     | Queryable SQL object                    |
| ------------- | --------------- | ---------------------------------------------------------- | --------------------------------------- |
| Pulsar        | SQLCatalog name | Full Pulsar tenant and namespace, such as `public/default` | Source named after the local topic name |
| Kafka         | SQLCatalog 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. SQLCatalog 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 SQLCatalog 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 SQLCatalog 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 SQLCatalog stops topic discovery and stops its managed sources from consuming newly published records. Data that the SQLWorkspace 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).
