Data priming
Prime Joule with necessary startup data
This is an optional feature that provides the ability to prime Joule with data necessary for an active use case
Overview
Advanced use cases often require contextual data to support calculations or complex business logic. Joule enables this by offering data priming at initialisation and enrichment processing stages.
The initialisation process imports data at startup from local files into an in-memory SQL database, making it immediately available for use in processing.
To see what formats can be imported, see the Types of imports page.
Initialisation process
Joule’s initialisation process leverages an embedded SQL engine, enabling powerful features like metrics, event capturing, data exporting and access to contextual data.
This imported data, typically static contextual information, plays a vital role in supporting key functions within the event stream pipeline.
Data made available through the initialisation process can be accessed through several main components:
Enricher processor For adding contextual information to events.
Metrics engine For real-time calculations and metrics updates.
Select projection For choosing specific fields for further processing.
In-memory SQL API For direct data access and manipulation within Joule.
schema
Global database schema when set can be used for any import definition where schema is not defined. Default schema reference_data
String
Examples & DSL attributes
This following example demonstrates how to initialise two separate data files into independent in-memory SQL database tables using CSV and Parquet formats.
The CSV file contains Nasdaq company information, it is treated as static reference data and is therefore stored in the
reference_data
schema.Meanwhile, the Parquet file loads pre-calculated metrics, priming the metrics engine within the
metrics
schema.
This setup enables efficient access to contextual data and metrics calculations during event processing.
This feature can load and read files from existing databases!
Attributes schema
These are common DSL keywords used in both parquet and CSV importing methods.
schema
Database schema to create and apply table import function
String
table
Target table to import data into
String
drop table
Drop existing table before
import. This will cause a table recreation
Boolean Default true
Index
If this optional field is supplied the index is recreated once the data has been imported.
fields
A list of table fields to base index
on
String
unique
True for a unique index
Boolean
Default true
Last updated