Custom transform example
Custom parser converts an internal Joule StreamEvent into a domain object
Objective
The objective of this example is to demonstrate how to implement a custom CustomTransformer
to convert an internal Joule StreamEvent
object to a domain-specific Quote
object.
On how to implement a custom transformation, reference the CustomTransform API documentation.
Example
Explanation
The example demonstrates a custom implementation of the CustomTransformer
interface, specifically designed to convert a StreamEvent
objects to domain specific types.
Constructor
The constructor is required but does not contain any specific logic for this example.
Transform single event method
This core method that converts the StreamEvent
object to a single domain specific object. This is performed by a simple attribute mapping from the StreamEvent
to Quote
constructor parameter requirements.
Transform batch events method
This method is called when in micro-batching mode. It takes a collection of StreamEvent
s and converts to a collection of domain specific events using the defined single event transform method.
Quote attributes description
Last updated