<a id="lightning-tables-manage"></a>

# Manage Lightning Tables in Confluent Cloud

Use the Confluent Cloud Console to enable, view, query, and disable Lightning
Tables, and to check their status.

#### IMPORTANT
Lightning Tables are rolling out to Confluent Cloud accounts in phases. If
you don’t see this feature, it’s not available for your account at
this time.

## Prerequisites

Before you begin, make sure that you have the following:

- A Apache Kafka® topic in a Confluent Cloud cluster.
- A schema for the topic. If the topic doesn’t have one, the
  Cloud Console prompts you to create one when you enable the
  Lightning Table. For more information, see
  [Enable a Lightning Table for a topic without a schema](#lightning-tables-manage-no-schema).

## Enable a Lightning Table for a topic

You can enable a Lightning Table from the **Lightning Tables** page,
the **Topics** page, or a topic’s **Settings** tab. Each one opens the
same confirmation dialog.

After you confirm, the dialog shows the setup progress. Enabling a
Lightning Table takes several minutes. You can close the dialog and
check back later. When setup completes, a dialog opens that confirms
the Lightning Table is enabled. Here, you can query the Lightning Table
with SQL.

### From the Lightning Tables page

To enable a Lightning Table from the cluster’s **Lightning Tables**
page, see [Get Started with Lightning Tables in Confluent Cloud](get-started.md#lightning-tables-get-started).

### From the Topics page

To enable a Lightning Table from the **Topics** page, complete the
following steps.

1. Sign in to the Confluent Cloud Console at
   [https://confluent.cloud/](https://confluent.cloud/).
2. From the navigation menu, select **Environments**.
3. Select your environment.
4. From the navigation menu, select **Clusters**.
5. Select your cluster.
6. From the cluster’s navigation menu, select **Topics**.
7. In the **Lightning Tables** column for your topic, click
   **+ Enable**.

   You might need to scroll right to see the column.
8. In the confirmation dialog, click **Enable**.

### From a topic’s settings

To enable a Lightning Table from a topic’s settings, complete the
following steps.

1. From the cluster’s navigation menu, select **Topics**.
2. Select your topic.
3. Click the **Settings** tab.
4. In the **Lightning Table** section, click **Enable Lightning
   Table**.
5. In the confirmation dialog, click **Enable**.

<a id="lightning-tables-manage-no-schema"></a>

## Enable a Lightning Table for a topic without a schema

A Lightning Table needs a schema for its topic. If the topic doesn’t
have one, the Cloud Console prompts you to create one before
it enables the Lightning Table. When you apply the schema, Confluent Cloud
registers it with Schema Registry.

To enable a Lightning Table for a topic without a schema, complete the
following steps.

1. From the cluster’s navigation menu, select **Lightning Tables**.
2. Click **Add Lightning Table**.

   If the cluster doesn’t have any Lightning Tables yet, click
   **Enable Lightning Table** instead.

   A dialog opens that lists the topics in your cluster.
3. Clear the **Has schema** checkbox.

   The list now includes topics without a schema.
4. In the **Lightning Table** column for your topic, click **Enable**.
5. In the **Create a topic schema before you enable the Lightning
   Table** dialog, paste a sample JSON message or write your own
   schema.
6. For **Format**, select the schema format.
7. Click **Continue**.
8. In the confirmation dialog, click **Enable**.

## View Lightning Tables

The **Lightning Tables** page lists the Lightning Tables in a cluster.

To view the Lightning Tables in a cluster, select **Lightning Tables**
from the cluster’s navigation menu.

The **Lightning Tables** page shows the following columns for each
Lightning Table:

- **Topic name**: The topic that the Lightning Table is enabled for.
- **Lightning Table status**: The current status of the Lightning
  Table. For more information, see
  [View Lightning Table status](#lightning-tables-manage-status).
- **Size**: The present size of the Lightning Table.
- **Scanned bytes**: The bytes scanned across all queries on the
  Lightning Table in the last 24 hours.
- **Preview**: An icon that opens the Lightning Table for querying. For
  more information, see [Query a Lightning Table in the Cloud Console](#lightning-tables-manage-query).

To find a Lightning Table, enter a topic name in the **Search topics**
box.

The **Topics** page also has a **Lightning Tables** column, which shows
whether each topic has a Lightning Table. You might need to scroll
right to see it.

<a id="lightning-tables-manage-query"></a>

## Query a Lightning Table in the Cloud Console

You can query an active Lightning Table with SQL in the
Cloud Console.

To query a Lightning Table, complete the following steps.

1. From the cluster’s navigation menu, select **Lightning Tables**.
2. In the **Preview** column for your Lightning Table, click the
   **Query data** icon.

   The **Preview Lightning Table** pane opens.
3. On the **SQL** tab, edit the prefilled query to explore your data.
4. Click **Run**.

   The results appear in the pane.
5. When you finish querying, close the pane.

Besides the **SQL** tab, the pane has the following tabs with sample
code that you can copy:

- **API**: A curl command that sends a POST request to query the
  Lightning Table.
- **MCP**: An `npx` command that opens the MCP Inspector, so you can
  try the Model Context Protocol (MCP) server for the Lightning Table.

Results from a Lightning Table query might differ from the results of
an Apache Flink® streaming or snapshot query that you run in the SQL workspace.
For how these query types compare, see
[What is a Lightning Table query](query/overview.md#lightning-tables-query-definition).

For the SQL that a Lightning Table query supports, see
[SQL Reference for Lightning Table Queries in Confluent Cloud](query/sql-reference.md#lightning-tables-sql-reference).

If you access the Lightning Table over a private network, you can’t run
queries in the Cloud Console. Use the associated private
endpoint for the API or MCP instead. For more information, see
[Private Networking for Lightning Tables in Confluent Cloud](private-networking.md#lightning-tables-private-networking).

<a id="lightning-tables-manage-status"></a>

## View Lightning Table status

The Cloud Console shows a Lightning Table’s status in the
following places:

- The **Lightning Table status** column on the **Lightning Tables**
  page.
- The **Lightning Tables** column on the **Topics** page.
- The status badge on the topic page.
- The **Status** field in the **Lightning Table** section of the
  topic’s **Settings** tab.

A Lightning Table can have the following statuses:

| Status       | Description                                                                                                               |
|--------------|---------------------------------------------------------------------------------------------------------------------------|
| Pending      | Confluent Cloud is validating the Lightning Table before setup.                                                           |
| Provisioning | Confluent Cloud is setting up resources for the Lightning Table.                                                          |
| Active       | The Lightning Table is ready to query.                                                                                    |
| Unavailable  | Queries are temporarily unavailable while Confluent Cloud restores the<br/>Lightning Table.                               |
| Failed       | The Lightning Table can’t recover from an error. Fix the cause.<br/>Then disable the Lightning Table and enable it again. |
| Deleting     | Confluent Cloud is deleting the Lightning Table. You can’t query it.                                                      |

You can query a Lightning Table only when its status is **Active**.

If a topic doesn’t have a Lightning Table, the **Status** field on its
**Settings** tab shows **Off**.

The **Lightning Table** section of the **Settings** tab also shows the
following details:

- **Endpoint**: The MCP endpoint for the Lightning Table.
- **Enabled on**: When the Lightning Table was enabled.

## Disable a Lightning Table

When you disable a Lightning Table, the topic data becomes unavailable
to any applications that query the Lightning Table.

To disable a Lightning Table, complete the following steps.

1. From the cluster’s navigation menu, select **Topics**.
2. Select your topic.
3. Click the **Settings** tab.
4. In the **Lightning Table** section, click **Disable Lightning
   Table**.
5. In the confirmation dialog, click **Disable**.

When the Lightning Table is disabled, the **Status** field shows
**Off**.

## Related content

- [Get Started with Lightning Tables in Confluent Cloud](get-started.md#lightning-tables-get-started)
- [Lightning Table Queries in Confluent Cloud](query/overview.md#lightning-tables-query-overview)
- [SQL Reference for Lightning Table Queries in Confluent Cloud](query/sql-reference.md#lightning-tables-sql-reference)
- [Private Networking for Lightning Tables in Confluent Cloud](private-networking.md#lightning-tables-private-networking)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
