Conceptual Model
Open Data Fabric clearly separates two types of data:- Source - represented by this data comes directly from external systems, with party that owns the dataset having complete authority over the data and fully accountable for its veracity
- Derivative - represented by this data is produced by transforming and combining other datasets (root or derivative).
A and B the derivative dataset C can be though of as a pure function:
A, B here are both potentially infinite data streams, and function f() is a streaming (temporal) processing operation that produces another stream as an output.
Stream processing composition works just like normal functional composition:
Imagine being able to erase all derivative data in the world and reconstruct it in identical form just from source data. Derivative data in ODF sometimes feels like a superpower.
Creating Derivative Datasets
Derivative datasets are created by specifying the metadata event. Example:inputs- data from which datasets will be used as input to this pipeline steptransform- the transformation being performed.
Execution Model
When you usekamu pull on a derivative dataset the tool will:
- Start the appropriate
- Restore the state of computation from previous (if any)
- Feed the previously unseen data from all inputs
- Write results into a new
- Suspend the computation state into a new
- Write a new
Supported Operations
Some typical operations you can perform on datasets (in the order of increasing complexity) are:- Map - performing computation on one record at a time
- Filter - deciding whether to include a record in the output based on some condition that considers only one record at a time
- Aggregation - combining values of multiple records together based on some grouping function (e.g. a time window)
- Projection - an aggregation aimed at reducing dimensionality of data
- Stream-to-Stream Join - combining several streams of data based on some predicate and a time window
- Temporal Table Join - joining a stream to a projection of another stream that represents “current state” of some evolving data based on the timestamp of individual records.
Consistency
Modern stream processing frameworks should be more appropriately called “temporal processing frameworks” as they account for time of records and all kinds of time-related problems during the computations. Transparently to the user streaming can handle situations like:- Late arrivals and backfills
- Out-of-order arrivals
- Phase shift and differences in data arrival cadences when joining several streams
Stream processing to batch is like what calculus is to algebra!