Statements¶
Statements control execution and side effects within blocks.
Quick patterns¶
- Use
LETfor new bindings andSETfor mutation. - Guard code with
IFandTRY/CATCH. FOR EACHiterates collections; comprehensions provide shorthand for arrays.OUTPUT { ... }shapes final payloads.
Output¶
OUTPUT specifies how results are emitted from the pipeline.
Using¶
USING references adapters and external modules.
Transform¶
TRANSFORM defines transformation steps. Use OPTIONS { ... } after the signature to declare per-transform settings.
For loops¶
FOR and FOR EACH iterate over collections.
If statements¶
IF provides conditional branching.
Enumerations¶
ENUM defines enumerated types inside TYPE declarations.
For each shorthand¶
FOREACH is a shorthand loop form.
Input¶
INPUT references the pipeline input data.
Abort¶
ABORT terminates execution immediately.
Throw¶
THROW raises an error.
Try/Catch¶
TRY handles errors and exceptions.
Call¶
CALL invokes host-provided functions.
Shared¶
SHARED declares shared memory resources.
Functions¶
FUNC declares reusable functions.
Types¶
TYPE declares custom types.
Return¶
RETURN exits from functions.
Modify¶
MODIFY changes existing values.
Where¶
WHERE filters loop iterations and comprehensions.
Set/Append/Init¶
SET, APPEND, TO, and INIT are assignment operations used in loops and shared writes.
Init¶
INIT provides an initial value when appending to a missing target.