Using Apama with Software AG Designer > Using Query Designer > Creating queries in Query Designer > Configuring queries to import definitions
Configuring queries to import definitions
In the Configure Query dialog, you can import event types and aggregate functions. 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.
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 view, 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 dialog, 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 view, 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. 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-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.