SUPPORT FOR A PARAMETERIZED QUERY/VIEW IN COMPLEX EVENT PROCESSING
First Claim
1. A method of providing parameterized queries in complex event processing (CEP) environment, the method comprising:
- providing a query template which includes one or more bind variables, wherein the one or more bind variables are typeless within the CEP environment;
providing sets of parameters corresponding to the one or more bind variables;
parsing the query template to determine positions of the one or more bind variables;
scanning the provided sets of parameters to determine which of the sets of parameters are to be bound to the one or more bind variables;
binding the one or more bind variables which are determined to be bound to the corresponding sets of parameters;
inserting arbitrary predicates into the query template, based on the one or more bind variables being typeless;
substituting the bound one or more bind variables with the corresponding sets of parameters;
based on the sets of parameters, generating a single parameterized query which is a template that provides possible values for the bound one of more bind variables;
determining a placeholder occurring in the single parameterized query for processing an event stream;
based on the single parameterized query, generating multiple customized queries and views which differ by at least only one variable, wherein the multiple customized queries and views are maintained by substituting the placeholder at runtime of with parameters from the sets of parameters.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention includes a method for providing parameterized queries in complex event processing (CEP). The method includes providing a query template which includes one or more bind variables, providing sets of parameters corresponding to the one or more bind variables, and parsing the query template to determine positions of the one or more bind variables. The method further includes scanning the provided sets of parameters to determine which of the sets of parameters are to be bound to the one or more bind variables, binding the one or more bind variables which are determined to be bound to the sets of parameters, and substituting the bound one or more bind variables with the corresponding sets of parameters. The method further includes injecting all incarnations of the parameterized queries into the system, and one template/parameterized query is configured to run them all.
-
Citations
20 Claims
-
1. A method of providing parameterized queries in complex event processing (CEP) environment, the method comprising:
-
providing a query template which includes one or more bind variables, wherein the one or more bind variables are typeless within the CEP environment; providing sets of parameters corresponding to the one or more bind variables; parsing the query template to determine positions of the one or more bind variables; scanning the provided sets of parameters to determine which of the sets of parameters are to be bound to the one or more bind variables; binding the one or more bind variables which are determined to be bound to the corresponding sets of parameters; inserting arbitrary predicates into the query template, based on the one or more bind variables being typeless; substituting the bound one or more bind variables with the corresponding sets of parameters; based on the sets of parameters, generating a single parameterized query which is a template that provides possible values for the bound one of more bind variables; determining a placeholder occurring in the single parameterized query for processing an event stream; based on the single parameterized query, generating multiple customized queries and views which differ by at least only one variable, wherein the multiple customized queries and views are maintained by substituting the placeholder at runtime of with parameters from the sets of parameters. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for providing parameterized queries in complex event processing (CEP), the system comprising:
-
a memory; and a processor coupled with the memory, wherein the memory has sets of instructions stored thereon which, when executed by the processor, cause the processor to; provide a query template which includes one or more bind variables, wherein the one or more bind variables are typeless within the CEP environment; provide sets of parameters corresponding to the one or more bind variables; parse the query template to determine positions of the one or more bind variables; scan the provided sets of parameters to determine which of the sets of parameters are to be bound to the one or more bind variables; bind the one or more bind variables which are determined to be bound to the corresponding sets of parameters; insert arbitrary predicates into the query template, based on the one or more bind variables being typeless; substitute the bound one or more bind variables with the corresponding sets of parameters; based on the sets of parameters, generate a single parameterized query which is a template that provides possible values for the bound one of more bind variables; determine a placeholder occurring in the single parameterized query for processing an event stream; instantiate a new query based on the query temple which includes the corresponding sets of parameters substituted for the one or more bind variables and injecting the new query into a CEP server; based on the new query, build a query execution plan;
adding the query execution plan to a runtime environment as a continuous query; andexecute the continuous query to process the event stream. - View Dependent Claims (10, 11)
-
-
12. A non-transitory computer-readable medium having sets of instructions stored thereon which, when executed by a computer, cause the computer to:
-
provide a query template which includes one or more bind variables; provide sets of parameters corresponding to the one or more bind variables; parse the query template to determine positions of the one or more bind variables; bind the one or more bind variables which are determined to be bound to the corresponding sets of parameters; substitute the bound one or more bind variables with the corresponding sets of parameters; based on the sets of parameters, generate a single parameterized query which is a template that provides possible values for the bound one of more bind variables; determine a placeholder occurring in the single parameterized query for processing an event stream; based on the single parameterized query, generate multiple customized queries and views which differ by at least only one variable, wherein the multiple customized queries and views are maintained by substituting the placeholder at runtime of with parameters from the sets of parameters; and execute the continuous query to process the event stream. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification