Metrics
Enrich events with pre-calculated metrics to facilitate further advanced processing
Objective
Advanced use cases may need pre-computed metrics as inputs for calculations, event triggers, or additional context.
The enricher processor uses the Metrics Engine query interface to query and bind metrics to an event using additional DSL attributes
The Metrics Engine is enabled by default using the following configuration in joule.properties: joule.internaldb.enable=true
Uses
There are various uses for this filter such as:
In retail Utilise real-time sales data and competitor pricing metrics to adjust product prices dynamically, maximising profit margins and ensuring competitiveness.
In manufacturing Use sensor data from machinery to predict failures before they occur, enabling proactive maintenance scheduling and reducing unplanned downtime.
In e-commerce Combine user behaviour data with product performance metrics to generate personalised product recommendations, enhancing the customer shopping experience.
Example & DSL attributes
This example defines three enrichment strategies:
bid_ask_avg Retrieves
avg_ask
andavg_bid
values by using theAskBidMovingAverage
metric family andsymbol
as the key from theMetricsDB
.market_depth_metrics Fetches all attributes related to
marketDepth
for a givensymbol
from theMetricsDB
.trading_triggers Retrieves
tradingTriggers
data as an object for a givensymbol
from theMetricsDB
.
All enrichments use the MetricsDB
for data retrieval.
Attributes schema
To direct the enricher to use the computed in-memory metrics database two attributes must be set.
Last updated