Implementing parameterized queries
An Apama query can define parameters and then refer to those parameters throughout the query definition. This enables a query definition to function as a template for multiple query instances.
A query that defines parameters is referred to as a parameterized query. An instance of a parameterized query is referred to as a parameterization.
A parameterized query offers the following benefits:
![*](bullet1.png)
Patterns of interest (
find patterns) may be customized from a single generic query. This can significantly reduce the amount of code that needs to be written and maintained.
![*](bullet1.png)
Parameterizations exist only at runtime. There is no need to maintain a file for each instance.
![*](bullet1.png)
Parameters can be used throughout the query in which they are defined. For example, you can use them in the definition of inputs, in
find actions, and in user-defined actions. Values do not need to be hardcoded.