addStatelessMetrics

Syntax

addStatelessMetrics(engine, metrics)

Details

Adds computation metrics to a reactive stateless engine.

Parameters

engine is a STRING scalar or an object, specifying the reactive stateless engine to which computation metrics are added.

metrics is a table that specifies computation metrics to be added.

  • formula: A STRING value that specifies the computation logic. Variables are identified by the values in the column specified by keyColumn. If keyColumn specifies multiple columns, the values are joined with :.
  • outputMetricKey: A STRING value that specifies the metric name for this computation.
  • triggerOn: A STRING value that specifies the data identifier triggering this computation. The computation is triggered when the column specified by keyColumn has this value. If keyColumn specifies multiple columns, the values are joined with :.
  • filter: A data pair that specifies the scope of the computation results. Only results within this scope are output.

Examples

metricsTable = table(
    ['"factor1" * "factor2"'] as formula,
    ["value3"] as outputMetricKey,
    ["factor1"] as triggerOn,
    [10:20] as filter
)

addStatelessMetrics("engine1",metricsTable)

Related functions: getStatelessMetrics, deleteStatelessMetrics