A Query node is an Input node that represents a query that is stored in the GE Digital APM Catalog. You can use a Query node to access the results of a specific query. The query will run each time the policy is executed so that the latest results are used in the policy execution. If the specified query contains prompts, you must use the node's Properties window to identify the values that should be provided to the prompts.
A Query node generates the following outputs:
Note: A Query node cannot be the first node in a policy model.
The Properties window for a Query node contains the items that are described in the following table.
Item |
Description |
Notes |
---|---|---|
Query Path |
Specifies the path to the query that will run when the policy is executed. |
You can enter the path manually, or
you can browse to the query by selecting The query that you choose must meet the following criteria:
|
Query section |
Provides values to any query prompts. |
One Query section appears for each prompt in the selected query. The label that appears after Query: identifies the prompt caption. You can select |
The following example illustrates how you can use the Query node with other nodes in a policy model to access and analyze Policy Event records using the Events Query in the baseline GE Digital APM Catalog.
Consider the following nodes and connections.
In this example, the Policy Events Query Query node is connected to the Equipment Entity node and to a Collection Filter node, which is then connected to various additional Condition, Calculation, and Action nodes.
As shown in the following image, you can use the Properties window for the Query node to specify the query whose results you want to use in the policy model. You can also see that the specified query contains a prompt, Asset Key, and that a system field from the Equipment Entity node, Entity Key, is used to supply values to the prompt.
When you connect the Query node to a successor node, in the Properties window of the successor node, you can select the Result Set option to evaluate the full query results.
In this example, the Collection Filter node is used to filter the query results. As you can see in the following image of the Properties window for the Collection Filter node, the query results are filtered to include only the policy events that lasted longer than 10 seconds, occurred within the last month, and have the name IOW Excursion.
The subsequent Calculation and Condition nodes evaluate the filtered query results and trigger actions when the specified conditions are met. Specifically, the remaining nodes in this policy work together to send an email message and to create a recommendation if the filtered query contains more than two results or if the total duration of the query results exceeds 4 minutes.
Copyright © 2018 General Electric Company. All rights reserved.