Lightning Tables in Confluent Cloud
A Lightning Table makes the data in an Apache Kafka® topic available for low-latency SQL queries. You enable a Lightning Table for a topic, and then you query it with SQL. You can query from the Confluent Cloud Console, an HTTP API, a Model Context Protocol (MCP) client, the Confluent CLI, or a Java Database Connectivity (JDBC) client.
How Lightning Tables work
When you enable a Lightning Table for a topic, Confluent Cloud materializes the topic data into a table that’s optimized for fast lookups. Confluent Cloud updates the Lightning Table within 100 milliseconds of new data arriving in the topic.
Lightning Tables are fully managed. You don’t need to provision infrastructure, write Kafka consumers, or manage Apache Flink® jobs.
Key capabilities
Lightning Tables provide the following capabilities:
Flexible query support: Query data using key lookups, filters, ranges, and predicates with compound logic. For more information, see Query a Lightning Table in Confluent Cloud.
Role-based access control (RBAC): Control who can enable topics and who can query data by using Confluent Cloud RBAC roles. For more information, see Manage Access to Lightning Tables in Confluent Cloud.
Usage-based billing: Pay only for the compute and storage you use, with no infrastructure to provision or scale manually. For more information, see Confluent Pricing. To track usage, see Monitor Lightning Tables in Confluent Cloud.
Supported cluster types and regions
Lightning Tables are available on Basic, Standard, Enterprise, and Dedicated clusters on AWS.
Lightning Tables are available in some AWS regions. To find them, see the Lightning Tables row in the tables in AWS region availability.
Ways to query a Lightning Table
You query a Lightning Table with SQL through any of the following interfaces:
Cloud Console: Run a query in the Preview Lightning Table pane. For more information, see Query a Lightning Table in the Cloud Console.
API: Send a query to the API in a POST request. The API tab of the Preview Lightning Table pane generates a sample request for your Lightning Table.
MCP: Connect an MCP client, such as Claude Code, to query the Lightning Table with MCP tools. For more information, see Query a Lightning Table with MCP in Confluent Cloud.
Confluent CLI: Run a query from a terminal or a script with the
confluent lightning querycommand. For more information, see Query a Lightning Table with the Confluent CLI in Confluent Cloud.JDBC: Connect SQL clients, business intelligence (BI) tools, and Java applications with the Confluent JDBC driver. For more information, see Query a Lightning Table with JDBC in Confluent Cloud.
You can’t run queries in the Cloud Console or with the Confluent CLI over a private network. Instead, use the API, MCP, or JDBC with a private endpoint. For more information, see Private Networking for Lightning Tables in Confluent Cloud.
To learn more about Lightning Table queries, see Query a Lightning Table in Confluent Cloud. For the SQL that a Lightning Table query supports, see SQL Reference for Lightning Table Queries in Confluent Cloud.
Append and upsert modes
A Lightning Table ingests data in one of two modes. The mode determines what you can query:
Append mode (default): The Lightning Table ingests every record from the topic, so you can query all the topic’s records. This mode suits event logs and other immutable data.
Upsert mode: The Lightning Table keeps only the latest record for each key, so you query the current state of each key rather than its full history. This mode suits stateful entities, such as customer profiles, inventory, or order status.
The Lightning Table selects the mode automatically based on the topic’s cleanup.policy. For upsert mode requirements and behavior, see Upsert mode.