Lightning Queries in Confluent Cloud
A lightning query reads data from the materialized table Confluent maintains for a topic that has the Real-Time Context Engine enabled. Confluent refreshes that table within seconds of new data arriving. The table persists independently of the topic’s own retention policy, so a lightning query can return data that has already aged out of the topic itself.
Unlike a streaming query, which runs continuously and returns results incrementally, a lightning query runs once and returns an output. In that respect, it works like a snapshot query. But a lightning query targets a different performance profile: millisecond response times and high concurrency for point lookups, range scans, and full scans, rather than complex, exploratory analysis over historical data.
Query through an AI agent
Today, you issue a lightning query by connecting an AI agent to the Real-Time Context Engine. The agent uses Model Context Protocol (MCP) tools to discover topics, inspect schemas, and query data on your behalf.
For setup instructions and example queries, see Query Data.
Note
Direct API access, issuing a lightning query yourself without an AI agent, is an Early Access Program feature in Confluent Cloud.
An Early Access feature is a component of Confluent Cloud introduced to gain feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on preview editions.
Early Access Program features are intended for evaluation use in development and testing environments only, and not for production use. Early Access Program features are provided: (a) without support; (b) “AS IS”; and (c) without indemnification, warranty, or condition of any kind. No service level commitment will apply to Early Access Program features. Early Access Program features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Early Access Program features at any time in Confluent’s sole discretion.
To participate in the Early Access Program, see the sign-up form.
