> ## 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 Workspaces Architecture (Private Preview)

> Understand how SQL Workspaces, SQL Catalogs, SQL Studio, and PostgreSQL clients work together.

SQL Workspaces provide a managed architecture for processing streams from StreamNative Pulsar and Kafka clusters with PostgreSQL-compatible SQL.

<Note title="Private Preview">
  SQL Workspaces are available by invitation only. During Private Preview, manage SQL Workspace and SQL Catalog resources through the StreamNative Cloud Console. You can query a workspace through SQL Studio or its native PostgreSQL endpoint.
</Note>

<CardGroup cols={2}>
  <Card title="Get started" icon="play" href="/sql/get-started/get-started">
    Create a workspace, add a catalog, and run a query.
  </Card>

  <Card title="Understand access control" icon="key" href="/sql/access-control/access-control-overview">
    Learn how cloud resource and SQL Workspace engine permissions work.
  </Card>

  <Card title="Understand SQL Workspace" icon="database" href="/sql/overview/sqlworkspace">
    Learn about the engine model, placement, lifecycle, and query endpoints.
  </Card>

  <Card title="Understand SQL Catalog" icon="link" href="/sql/overview/sqlcatalog">
    Learn how Pulsar and Kafka clusters map to databases and topic sources.
  </Card>
</CardGroup>

## Architecture

```text theme={null}
Users and applications
+---------------------------+       +--------------------------------+
| SQL Studio                | ----> | SQL Workspace                  |
| Native PostgreSQL clients | ----> |                                |
+---------------------------+       | SQL Catalog      SQL Catalog   |
                                    +------|----------------|--------+
                                           |                |
                                           v                v
                                    Pulsar cluster     Kafka cluster
```

## Components

| Component | Responsibility |
| - | - |
| **SQL Workspace** | Provides a managed SQL environment and the SQL Studio and native PostgreSQL query interfaces. |
| **SQL Catalog** | Connects one Pulsar or Kafka cluster to a SQL Workspace and represents the cluster as a database. A workspace can contain multiple SQL Catalogs. |

## Setup flow

1. A user creates a SQL Workspace in an eligible hosted location or ready BYOC Cloud Environment through the Cloud Console.
2. StreamNative prepares the SQL Workspace in the selected placement. During Private Preview, SQL Workspaces are supported only on AWS.
3. The user adds a Pulsar or Kafka cluster as a SQL Catalog.
4. The SQL Catalog represents the cluster as a database in the SQL Workspace.
5. The user creates tables or materialized views based on the managed topic sources for subsequent processing.

## Query flow

1. Pulsar or Kafka delivers new events to the connected topics.
2. The SQL Catalog makes eligible topics from its connected cluster available to the SQL Workspace.
3. The SQL Workspace evaluates ad hoc queries or continuously maintains materialized views.
4. Users submit SQL and retrieve results through SQL Studio or a PostgreSQL-compatible client.


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