SAService Architect Back to designer
SAService ArchitectDocumentation
Stream type KeyValue<K,A> + KeyValue<K,B> → R

Join

Correlates exactly two keyed inputs and exposes their accumulated values to one stateful callback.

When to use

Use Join when two event families share one correlation key and the side that may trigger processing is part of the contract.

Behavior

  • The primary source is storage slot 0; the single additional source is slot 1. Arrival order is unrestricted.
  • Values accumulate as left[] and right[] for each K; A and B may be different types.
  • joinType determines callback eligibility after each arrival: Inner requires both arrays, Left requires left, Right requires right, and Outer always qualifies.
  • The callback may emit zero or more R values. Returning true marks K complete and deletes all retained values; returning false keeps them for later arrivals.
  • With a positive TTL, expiry performs one final eligibility check and then removes the key. A message context deadline overrides the configured TTL for that key.

General properties

Identity, ownership and operator-specific mode.

PropertyTypeDescription
typeTransformationType

Operator kind. It controls available properties, valid sources and generated interfaces.

RequiredAllowed: Input, Map, Filter, Join, MultiJoin, Process, FlatMap, FlatMapIterable, KeyBy, Merge, Split, Case, Sink, CycleLink, Error, Delay, When
namestring

Human-readable stream name shown in the designer and used to derive default generated symbols.

Required
joinTypeInner | Left | Right | Outer

Inner calls only when both sides are present; Left requires the primary side; Right requires the additional side; Outer calls after every arrival.

RequiredDefault: LeftAllowed: Inner, Left, Right, Outer
joinStorageHashMap

State backend for values accumulated by key. The schema also reserves RocksDB and Aerospike enum values, but HashMap is the only backend currently implemented and exposed by the Designer.

RequiredDefault: HashMapAllowed: HashMap
serviceService

Service that owns the stream. Connected streams must belong to the same service.

Required

Connections properties

Upstream graph references accepted by this operator.

PropertyTypeDescription
leftSourceKeyValue<K,V0> stream

Primary keyed input stored in value slot 0. Join and MultiJoin callback eligibility is anchored to this input.

Required
rightSourceKeyValue<K,V1> stream

The one additional input accepted by Join. It is stored in value slot 1; its key type K must equal the primary key type.

Required

Data Types properties

Message contracts visible at this node.

PropertyTypeDescription
valueTypeType

Output or response message contract. The exact meaning is operator-specific.

RequiredDefault: UnknownType

Function properties

Generated business-logic implementation and its placement.

PropertyTypeDescription
functionNamesymbol

Generated business-logic type or function name.

Required
functionPackagerelative path

Optional placement below the target-language functions root. Leave empty to use that root directly. A value such as folder/sub-folder is relative to the private or public functions root selected by publicFunction; nested-path handling is language-specific and is documented in Code Generation / Packages and Modules.

Default: empty (functions root)
publicFunctionboolean

Places the generated function in a shared package instead of the service-internal package.

Default: false
functionDescriptiontext

Documentation comment emitted with the generated function.

functionInitializerGroupstring

Dependency-injection initialization group for the generated function.

functionModuleModule

Shared module that owns the function.

Visible when publicFunction is true.

Execution properties

Pipeline placement and runtime policy.

PropertyTypeDescription
pipelinestring

Visual and configuration grouping inside the owning service.

ttlmilliseconds

Maximum configured lifetime of retained state for one key. 0 disables configured expiry. A message context deadline becomes the effective deadline for that key when present.

Default: 0Minimum: 0
renewTTLboolean

When the callback returns false, move the key back to active storage and renew its positive TTL after another value arrives.

Default: false

Position properties

Designer-only canvas coordinates.

PropertyTypeDescription
xPosnumber

Horizontal designer coordinate. It has no runtime effect.

Required
yPosnumber

Vertical designer coordinate. It has no runtime effect.

Required

Configuration example

type: Join
source: keyOrdersForJoin
sources: [keyPaymentsForJoin]
joinType: Inner
joinStorage: HashMap
ttl: 60000
renewTTL: true
valueType: analyticsResult
functionName: JoinOrderPaymentAnalytics