Old version of Key concepts
Enriching event data with the latest contextual data is crucial for processing real-time business insights.
Last updated
Enriching event data with the latest contextual data is crucial for processing real-time business insights.
Last updated
OOTB Joule has provided the heavy lifting required to deploy a low-latency solution so that developers can focus on building advanced use case that required addition contextual data. The Joule contextual data architecture supports various low-latency in-memory data stores that reduce the inherent I/O overhead of out-of-process databases and thus enable stream based enrichment.
The below example enriches events using the linked reference data and metrics. Reference data is imported at process startup using a provided parquet file. Metrics are calculated after 1 minute using a three minute tumbling window approach.
The above example generates the following output, in this case CSV.
The enricher processor provide users to the ability to enrich an event with multiple data elements from various data sources through the use of enhanced mapping.
Two key attributes are required for the enricher processor; one is to define which fields to enrich whereas the other provides the data store binding.
fields
List of fields to populated with reference data using a look up criteria.
List of field to reference data criteria configurations
stores
List of stores to perform the reference data lookup
List of store configurations
Enrichment is applied at the field level whereby each returned data element is added to the defined field either as map of values or as a domain object.
The field attribute is logical organised as three definition type:
Query approach
Response approach
Binding store
Contextual data is retrieved using one of two methods, by key or by query.
Using the key based look up approach enables you to perform a look up against a store using either the primary key or the key within a caching solution.
See ReferenceDataObject for further information
To fine tune your enrichment process you can define a query rather than a strict key based look up. This would provide you with a greater flexibility to drive further pipeline processing. Below represents a OQL based query using an in-memory cache solution.
by query
Dependent upon linked data store.
String
query fields
Event field values to be applied to the query
Ordered list of Strings
On a successful data retrieval the response object, ReferenceDataObejct, key values are added directly in to the event or added as an object.
with values
Values to add to the field as a map of key value pairs
List of Strings
all attributes
Map all returned values attributes to event
Boolean
as object
Returned value is linked as a object to the event
Boolean
Either one of the attributes must be provided.
Add selected attributes to the event.
Add all attributes to the event.
Add the returned object to the event using the field name.
Bind the field configuration to a data store using a logical store name. This would either be custom or using the pre-defined stores. A custom store should be defined under the Stores Attribute, see section for more details.
using
Store name to apply query processing. Either a custom or supported store
String
JouleDB
MetricsDB
If either one of these are provided there is no need to specify the stores attribute.
Bind the processor to one or more linked data stores using a logical store name mapped to a set of configuration attributes. The defined store name configuration needs to have been provided, see reference data documentation for further details.
The example below uses the nasdaqIndexCompanies
as a logical name to bind the reference data lookup criteria to be performed.
stores
List of stores required for the enricher. Usage is local logical name mapped to store name
String
store name
Actual store name specified in the reference data store configuration
String
For further information read Reference Data documentation