Using the Apama Studio Development Environment > Using Query Designer > Overview of creating a query in the Design tab
Overview of creating a query in the Design tab
After you add a query file to a project, Apama Studio opens Query Designer so that you can define the query. The Design tab presents several panes in which you can define the parts of the query. As you can see in the figure below, the initial display is empty:
Before you can define a query, you must define the events that you want the query to process. See Writing event definitions.
The typical steps for defining a query in the Design tab of Query Designer are as follows:
1. In the Inputs pane, click the plus sign to add an event type definition that you want the query to process. You must add one or more inputs before you can create the event pattern you are interested in. See Adding query inputs.
2. Optionally, in the Parameters pane, click the plus sign to add a query parameter. See Adding query parameters.
3. From the event Palette, select an input event and drag it onto the pattern canvas. See Adding query patterns.
4. In the Actions pane, click the plus sign to define an action that the query executes when it finds the specified event pattern. See Adding query actions.
5. Optionally, In the Conditions pane, click the plus sign to add a filter, time constraint or exclusion. Conditions let you identify the exact events you are interested in. You must add one or more inputs before you can add query conditions. See Adding query conditions.
6. Optionally, in the Aggregates pane, click the plus sign to add an aggregate expression to the find pattern. An aggregate expression aggregates event field values in order to find data based on many sets of events. See Adding query aggregates.
At any time, you can click the Source tab to view the code that defines your query.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.