<a id="lightning-tables-get-started"></a>

# Get Started with Lightning Tables in Confluent Cloud

Enable a Lightning Table for an Apache Kafka® topic, and then query it with
SQL in the Confluent Cloud Console.

#### 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 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](manage.md#lightning-tables-manage-no-schema).

## Enable a Lightning Table for a topic

When you enable a Lightning Table for a topic, Confluent Cloud makes the topic
data available for low-latency SQL queries. To enable one, 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 navigation menu, select **Lightning Tables**.
7. On the **Lightning Tables** page, 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. The list shows
   only topics that have a schema. To show topics without a schema,
   clear the **Has schema** checkbox.
   ![Dialog that lists the topics in a cluster, with an Enable link for each topic in the Lightning Table column.](lightning-tables/images/lightning-tables-enable-topic-list.png)
8. In the **Lightning Table** column for your topic, click **Enable**.
9. In the confirmation dialog, click **Enable**.

Enabling a Lightning Table takes several minutes. You can close the
dialog and check back later.

## Query the Lightning Table

When setup completes, a dialog opens that confirms the Lightning Table
is enabled. Here, you can query the Lightning Table with SQL.

![Dialog that confirms a Lightning Table is enabled, with SQL, API, and MCP tabs and a prefilled SQL query.](lightning-tables/images/lightning-tables-enabled-dialog.png)

To run your first query, complete the following steps.

1. On the **SQL** tab, review the prefilled query.

   The query returns up to 100 rows from your topic:
   ```sql
   SELECT * FROM `<topic_name>` LIMIT 100;
   ```
2. Click **Run**.

   The dialog closes, and the **Preview Lightning Table** pane opens and
   shows the results. To explore your data further, you can edit the
   query in the pane and run it again.
   ![Preview Lightning Table pane that shows a completed SQL query and a grid of results.](lightning-tables/images/lightning-tables-preview-pane-results.png)
3. When you finish querying, close the pane.

In addition to 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.

To open the pane again later, see
[Query a Lightning Table in the Cloud Console](manage.md#lightning-tables-manage-query).

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

## Next steps

To learn more about working with Lightning Tables, see the following
pages:

- [Manage Lightning Tables in Confluent Cloud](manage.md#lightning-tables-manage)
- [Private Networking for Lightning Tables in Confluent Cloud](private-networking.md#lightning-tables-private-networking)
- [Lightning Queries in Confluent Cloud](../ai/real-time-context-engine/lightning-queries.md#rtce-lightning-queries)
- [Query Data from the Real-Time Context Engine in Confluent Cloud](../ai/real-time-context-engine/query-data.md#rtce-query-data)

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