You are viewing documentation for an older version of Lenses.io View latest documentation here

Lenses SQL

One of the main benefits of Lenses is providing a secure way to query, inspect and control your data, wherever it might be.

Lenses comes with Lenses SQL (or LSQL), a declarative Structured Query Language (SQL) interface, supporting industry standard ANSI joins and aggregates for querying, transforming and manipulating data at rest and data in motion.

Lenses SQL engine has two running modes:


Point-in-time queries that pull existing data at rest from a data source.


  • Queries that manipulate live data in motion as a never-ending stream of events and push the result somewhere (e.g. a Kafka topic)
  • It’s the engine that powers the SQL Processors
  • It relies on Kafka Streams for distribution of workload and fault tolerance
  • It uses a proprietary SQL-like syntax which is very similar to common SQLs