From Clause

Just as a rule declaration specifies the scope of the rule, the from clause specifies the scope of the query. The items in the from clause must exist in the project ontology.

Using Strings (Instead of Variables) in From Clauses

Bind variables cannot be used in the from clause—you cannot use select * from $someConcept. However, to achieve a similar result you can use a new string to construct the query as shown in the following examples:

String conceptName1 = "/Concepts/Concept1";
Query.create("newQuery1", "select * from " + conceptName1);
String conceptName2 = "/Concepts/Concept2";
Query.create("newQuery2", "select * from " + conceptName2);

Continuous Queries

The from clause in a continuous query can specify window policies. See Overview of Continuous Queries for more information.

Examples

The select and from clauses are required for all queries.

select * from /Concepts/Address as A
select * from /Concepts/Customer B
select * from /EntityA as A
select * from /EntityB  B
select * from /EntityX, /EntityY, /EntityZ