SAService Architect Back to designer
SAService ArchitectDocumentation
Python API reference map | filter | process | delay | flat_map | flat_map_iterable | key_by

Map, Filter, Process, Delay, and expansion

Single-input operators that transform, select, execute, delay, expand, or key messages.

When to use

Choose the narrowest method that represents the callback contract and output shape.

Behavior

  • Methods requiring user code accept a Function object.
  • flat_map_iterable expands an iterable without a user Function.
  • key_by requires key_type because it changes the keyed stream contract.
  • delay requires duration and a Function because runtime-specific delay behavior may be generated.

Map and Filter properties

Common transformation operators.

PropertyTypeDescription
map(name, *, function, value_type=None, source=None, x=0, y=0)Stream

Transform one input and optionally change its value contract.

filter(name, *, function, source=None, x=0, y=0)Stream

Retain messages accepted by the callback.

Process and Delay properties

Execution and time control.

PropertyTypeDescription
process(..., pattern=None, value_type=None, error_stream=None)Stream

Execute or collect according to ProcessPattern.

delay(..., function, duration, source=None)Stream

Delay processing by duration milliseconds.

Expansion and keying properties

Cardinality and keyed contracts.

PropertyTypeDescription
flat_map(..., function, value_type=None)Stream

Emit zero or more callback results.

flat_map_iterable(..., value_type=None)Stream

Expand an iterable value.

key_by(..., function, key_type, value_type=None)Stream

Derive a key while retaining or selecting the value contract.

Common parameters properties

Shared by these factory methods.

PropertyTypeDescription
namestr

Human-readable stream name; the symbolic key is derived automatically.

Required
sourceStream | None

Optional primary upstream stream.

Default: None
x / yfloat

Designer canvas coordinates.

Default: 0 / 0
functionFunction

Business callback metadata used to generate the implementation contract.

Required
value_typeTypeDefinition | DataType | str | None

Output or boundary payload contract.

Default: None

Python example

validate = orders.filter("Valid Orders", function=validate_order)
enrich = orders.map(
    "Enrich Order", function=enrich_order, value_type=enriched_order
)
keyed = orders.key_by(
    "Key By Customer", function=customer_key, key_type=customer_id
)
validate >> enrich >> keyed