SQL Syntax in Event Stream Processor

The ESP On-Demand Query interface allows you to query active windows in a running ESP project using the esp_query tool.

These SQL queries can be run at any time, are ad-hoc (for example, you do not need to define them in advance), and they return a snapshot based on the contents of the window at the time of the query. This is an important distinction: SQL queries submitted via the On-Demand Query interface are snapshot queries, unlike CCL queries which are continuous queries.

Note that you can query only output windows in a running ESP project. Streams and delta streams cannot be queried in on-demand queries since they do not have state, and local windows cannot be queried since they are internal to a project and not visible outside the project.

Use esp_query to query an ESP project as well as the SQL syntax that is supported for on-demand queries.