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 one or more 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;
determining that the sets of parameters correspond to the same bind variable;
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;
substituting the placeholder at runtime with parameter values corresponding to the sets of parameters;
generating multiple customized queries and views which differ by at least only one variable based on the substituting;
instantiating a new query for each of the sets of parameters which correspond to the same bind variable as a continuous query; and
executing the continuous query to process the event stream.
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.
467 Citations
19 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 one or more 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; determining that the sets of parameters correspond to the same bind variable; 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; substituting the placeholder at runtime with parameter values corresponding to the sets of parameters; generating multiple customized queries and views which differ by at least only one variable based on the substituting; instantiating a new query for each of the sets of parameters which correspond to the same bind variable as a continuous query; and executing the continuous query to process the event stream. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. 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 one or more 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; determine that the sets of parameters correspond to the same bind variable; 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; substitute the placeholder at runtime with parameter values corresponding to the sets of parameters; generate multiple customized queries and views which differ by at least only one variable based on the substituting; instantiate a new query for each of the sets of parameters which correspond to the same bind variable as a continuous query; and execute the continuous query to process the event stream. - View Dependent Claims (9, 10)
-
-
11. A non-transitory computer-readable medium having sets of instructions stored for providing parameterized queries in complex event processing (CEP), 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, wherein the one or more bind variables are typeless within the CEP environment; 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; insert one or more 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; determine that the sets of parameters correspond to the same bind variable; 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; substitute the placeholder at runtime with parameter values corresponding to the sets of parameters; generate multiple customized queries and views which differ by at least only one variable based on the substituting; instantiate a new query for each of the sets of parameters which correspond to the same bind variable as a continuous query; and execute the continuous query to process the event stream. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
Specification