You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This document describes the basic concepts of the Continuous Query Language (CQL) of Odysseus and shows how to use the language. The Continuous Query Language (CQL) is a SQL based declarative query language. This document shows how to formulate queries with CQL.

Create Streams

The create stream statement is used to tell Odysseus where the data comes from, this normally opens a connection to a source, e.g. a sensor or server.

The stream consists of a name "category", a schema and some connection properties (...)

CREATE STREAM category (id INTEGER, name STRING, description STRING, parentid INTEGER) ....

Drop Streams

You can drop a stream with:

DROP STREAM category

Since this statement would return an error if the stream "category" does not exist, you can add "IF EXISTS" to avoid this error (it checks, if the stream is existing before running the drop)

DROP STREAM category IF EXISTS

Continuous Query

In summary, a CQL statement is like a SQL one, so the continuous query consists of a select, a from, a where, a goup and a having part.

Select

 

From

 

Where

 

Group By

  • No labels