Quick Reference
Padas Domain Language (PDL) defines stream-processing expressions over JSON events: filtering (boolean queries that retain or discard a record), parsing (string-to-field extraction), transformation (eval, type coercion, conditionals), routing (partition_by, aggregate rekey), and aggregation (windowed stateful reduction). Normative syntax and edge cases: Reference.
A pipeline is a linear chain of stages separated by | (or an equivalent stage list in the task configuration). Stages execute sequentially in source order. Each stage consumes the event projection produced by the previous stage and emits the next projection downstream; query stages filter without mutating retained rows unless combined with mutation stages in the same task definition.
Execution semantics
| Concept | Behavior |
|---|---|
| Stage chaining | Stages apply in order; there is no implicit parallelism inside a single PDL pipeline unless the runtime maps partitions independently. |
| Event flow | One inbound JSON record enters the chain; each stage reads the current field tree; parsers and eval materialize or overwrite fields; fields projects a subset; output may reduce the payload to a scalar for specialized sinks. |
| Filtering | A query stage evaluates a boolean expression; false drops the event for that branch; true forwards the unchanged projection unless a later stage mutates it. |
| Aggregation state | Windowed aggregations maintain state until the window closes and the engine emits one or more aggregate records per window (and per group_by key); see Aggregation. |
| Routing | partition_by and aggregate rekey influence how the runtime routes keyed work and sink partitions; see Partitioning. |
| Windows | timespan bounds the window lifecycle; tumbling, sliding, and session modes control overlap and gap handling; open windows retain buffers and partial aggregates until emission. |
Query expressions
Queries filter whole events: the expression evaluates to a boolean; true retains the event for subsequent stages, false discards it for that processing branch (unless the enclosing task type documents alternate behavior).
Comparison syntax
Field paths use dot notation for nested JSON, or bracket notation for array indexes and map keys (including hyphenated keys such as headers["content-type"]). Operators combine a path with a literal or comparable value.
field = value
field != value
field > value
field >= value
field < value
field <= value
field ?= value
field ~= pattern
field IN [v1, v2, v3]
| Operator | Semantics |
|---|---|
= / != | Equality / inequality on scalars; string = / != may use a single * wildcard in the pattern (see Wildcards). |
> / < / >= / <= | Ordered comparison on numeric or otherwise comparable scalars; not defined for wildcard string patterns. |
?= | String: substring contains the right-hand literal. Array: true if the array contains the scalar element (membership). |
~= | Regex match on string values; pattern syntax follows the engine’s regex implementation. |
IN | True if the field value equals any element of the right-hand array literal; array elements must be a uniform type (String or Integer) per query definition rules. |
Logical operators and precedence
NOT predicate
left AND right
left OR right
(query1 AND query2) OR query3
| Construct | Semantics |
|---|---|
NOT | Unary negation of the immediately following comparison or parenthesized subquery. |
AND / OR | Binary conjunction / disjunction; operands are comparisons or parenthesized queries. |
Precedence: NOT binds tightest (to its operand). AND binds tighter than OR. Therefore a AND b OR c groups as (a AND b) OR c. OR chains associate left-to-right at the same precedence level. Parentheses override defaults and should be used wherever mixing AND and OR would otherwise be ambiguous.
Evaluation order: Subexpressions inside parentheses evaluate as a unit before their result participates in outer operators. For deterministic matching and auditability, prefer explicit parentheses over reliance on default precedence.
Boolean and null semantics
Comparisons evaluate against the resolved field value and literal; missing paths or type mismatches surface as runtime or validation errors depending on stage configuration—see Errors. AND and OR use ordinary boolean truth; short-circuiting follows typical boolean evaluation in the engine implementation.
Wildcards
With = / != on string JSON, a single * wildcard is permitted in the pattern. Wildcard patterns are translated internally for matching; leading and embedded * patterns can increase scan cost versus trailing * prefix forms. field = "*" denotes field existence (non-null) semantics per deployment. Standalone * matches all events and should be treated as a last-resort predicate in high-volume streams.