Inner stream joins
Strict join between two event streams
Last updated
Was this helpful?
Strict join between two event streams
Last updated
Was this helpful?
To perform a strict join between two event streams, an inner join is used.
This join operator emits an event only when a successful match occurs between streams. Otherwise, it waits until the join criteria are met, as determined by the configured policy settings.
Among the previously mentioned examples in the , the application for inner joins can impact the following:
Immediate feedback loop It enables businesses to receive immediate feedback on customer behaviour, allowing for rapid adjustments to marketing strategies.
Enhanced customer experience By understanding which ads are clicked by which customers, businesses can personalise experiences and improve overall engagement.
This code defines a join operation for two streams (sitevisits
and webpage.adclicks
), based on a common customerId
.
expression
The join condition is that sitevisits.customerId
should match webpage.adclicks.customerId
.
merge events When the condition is met, the events from both streams are merged.
left policy (time to live)
The sitevisits
stream events are kept for a maximum of 30 minutes before they expire.
right policy (delete on join)
Once a matching event from webpage.adclicks
is joined with sitevisits
, the event from webpage.adclicks
is deleted.
This strategy merges data while ensuring that events are kept only within a specific timeframe and properly cleaned up once they are joined.