Description

The NumericDataSummary component allows you to easily perform summaries in the station from BQL queries and to export them as slots. It works on components, logs and alarms.

 

Implementation

  • Drag and drop the component into the station.
  • Fill the "InitQuery" slot with the initialization query. This query is used to initialize the creation of components of the syntheses. This makes it possible to construct the elements of the syntheses even if no value exists. The query must follow the following format:

{scheme}|bql: select {projection} from {extent} where {predicate}

The projection part must contain at least one element (general case) or may contain several elements. In the case where several elements are entered, the component concatenates the results.

Examples of initialization queries:

station:|slot:|bql:select usage from control:NumericPoint

station:|slot:/|bql: select parent.name, name from control:ControlPoint where name = 'temperature'


  • Enter the execution query into the "ExecuteQuery" slot. This may be similar to the initialization query or totally different. The "projection" part must be similar to the initialization query so that the component can find the corresponding synthesis element. It must also include one more column (at the end of the projection) describing the value that the synthesis must take.

Examples of execution queries:

station:|slot:|bql:select usage, avg(out.value) from control:NumericPoint

station:|slot:/|bql: select parent.name, name, count(*) from control:ControlPoint where name = 'temperature' and out.value > 2


  • Set the enabled property to true

Properties

  • Status: {ok} if there is no problem detected, changes to {fault} if the requests could not be executed, and {disabled} if the object is not enabled.
  • FaultCause: the description of the error if the component fails
  • Enabled: Enables / disables the component (blocks scheduled execution)
  • ExecuteTime: Time between each run. Note that if the component goes into a fault state, its automatic execution is interrupted. Repairing the component so it goes back into {ok} state should restart the automatic execution.
  • Facets: Allows facets to be applied to the "summary" property of created syntheses elements
  • InitQuery: This property defines the bql query used to create the syntheses elements.
  • ExecuteQuery: Execution query that allows the summary elements to be completed. Make sure you use the same projection (select part) as the initialization query. Also make sure you add a "where" to select only the components desired.
  • OptimizedQuery: The execution query optimized by the Optimize action. This query is used as priority, if not empty, rather than that of the ExecuteQuery slot.


Advanced configuration properties

  • InitOnStart: Sets whether the initialization query should be executed when the component is started
  • InitOnClone: Allows the initialization query to be run when copying a NumericDataSummary
  • ExecuteOnStart: Sets whether the execution query should be run immediately when the component is started. If the property is false, automatic execution will start after the time set in the executeTime property
  • OptimizeOnStart: Allows you to define whether the execution query should be optimized when the component starts
  • OptimizeOnClone: Allows optimization of the execution query when copying a NumericDataSummary
  • Persistence: If this property is enabled, the items are saved in the .bog and are affected by the transient and non-critical flags
  • NoResultPolicy {Zero, NaN, NullStatus}: Allows the Summary property value to be chosen from a summary element if it does not appear in the execution query. Zero forces the Summary property to 0 and state ok (for a synthesis of the number of points for example), NaN forces the property to NaN and state ok, and NullStatus forces the property to 0 and state null.
  • NoResultPolicyApplyOnNan: Applies the policy in case of no result to NaN value results
  • NoResultPolicyApplyOnlnfinite: Applies the policy in case of no result to +inf or -inf value results


Actions

  • Initialize: Runs component initialization, i.e. the creation of the synthesis elements from the initialization query
  • Execute: Runs component execution, i.e. the filling of the synthesis elements from the execution query
  • Optimize: Runs the execution query optimization. If the execution query is performed on a base larger than the results, the base (scheme part) is automatically reduced as far as possible to the results base. The intention is to obtain faster component execution. The optimized query is saved in the OptimizedQuery slot.


Topics

  • Initialized: Topic that triggers when component initialization is complete
  • Executed: Topic that triggers when component execution is complete (this can potentially trigger third-party logic a posteriori)