An enrich agent is a translate event processing agent (EPA) that takes one input event, queries a global state element, and produces one derived event. The output includes the original attributes, possibly with modified values, and may include new attributes calculated from the query results. section 6.2.4
A global state element holds data accessible to one or more event processing agents. An enrich agent can use it to obtain reference data: information that changes relatively slowly and is often external to the event processing application. Enrichment can add information or correct existing values for data cleansing. section 8.2.1 section 6.2.4
Enriching a delivery request
A Fast Flower Delivery request contains a store attribute. The Request enrichment agent uses it as a key to look up the store’s neighborhood and minimum acceptable driver ranking, then adds both values to the output event. A lookup can be expressed as SELECT MinRank, Region FROM StoreRef WHERE Store = ? section 8.2.1
Figure 8.10. The Request enrichment agent from the Fast Flower Delivery application. This agent uses the store attribute of the input event to find the flower store’s neighborhood and the minimum driver ranking that is acceptable to it, and adds these values as attributes to the output event.
Follow the store attribute from the incoming request through the lookup to the enriched output event. section 8.2.1
Enrich and project are both special cases of translate. Enrich uses global state to add or change values; project selects a subset of the input event’s attributes. section 6.2.4
