Apama Documentation : Using Apama with Software AG Designer : Using Query Designer : Creating queries in Query Designer : Configuring a query
Configuring a query
In the Configure Query dialog, you can configure the query to import event types and aggregate functions, query name and package, and metadata information.
Importing event types and aggregate functions lets you use the short name of an event type or an aggregate function instead of the full name. For example, when you are writing an aggregate:
*If you have imported the built-in aggregate function avg (), to calculate the average value ‘x' for all events ‘e', you can write avg (e.x) instead of the fully qualified package name com.apama.aggregates.avg(e.x).
*If you have not imported the built-in aggregate function avg (), to calculate the average value ‘x' for all events ‘e', you have to write the fully qualified package name com.apama.aggregates.avg(e.x).
Note:  
You can use the Configure Query dialog to clear the elements that are missing from the package.
To configure a query
1. In the Inputs toolbar, click the Configure Query icon . The Configure Query dialog appears with the list of event types and aggregate functions.
2. Optionally, in the Import definitions tab, you can filter the event types and aggregate functions in the list using the drop down list at the text box.
*Select Show Events to view only the event types.
*Select Show Aggregates to view only the aggregates.
*Select Show Both to view all the event types and aggregates.
3. In the Import definitions tab, select the required event type or the aggregate function.
In the text box, you can also type the name of the event type or the aggregate function that you want the query to import.
Note:  
You cannot select the event types or aggregate functions that are selected by default. These event types and aggregates are implicitly available as they share the same package as the query file.
4. In the Name & Package tab, you can edit the query name and package for an existing query file. If you do not specify a package in the Package (optional): field, then the query file is in the default package which contains EPL files that do not specify a package name.
5. In the Metadata tab, you can add, edit, or delete query metadata.
*To add a metadata entry, click . The Add metadata dialog appears. Enter the Key and Value, and click OK.
*To edit a metadata entry, select the entry you want to edit and click . The Edit metadata dialog appears. Edit the Key and Value, and click OK.
*To delete a metadata entry, select the entry you want to delete and click .
For more information on defining metadata, see Defining metadata in a query.
6. Click OK.
Optionally, when an event has been renamed or removed from the event definition file, then the missing events or aggregates appear in the Configure Query dialog. You can clear the missing events or aggregates in the Configure Query dialog by clicking Clear List.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback