Skip to content

Without

aggregating category: array no `||` new-mode: required resultSize: 1

Set difference of two ARRAY inputs — elements of :source not present in :exclude.

Without is an array-aware aggregating rule that returns the elements of its first input that are not equal to any element of its second input. Element comparisons follow the per-type Value equality operator. The result is a single ARRAY whose length is at most the source length.

Two equivalent shapes are accepted:

  • Parameter formWithout(:source, :exclude) resolves the two inputs by field name.
  • Pipeline form:source, :exclude => Without() uses the two positional pipeline inputs.

Available in new mode only.

Parameters

Parameter form

1source Mandatory — accepts: field

Field reference to the source ARRAY.

2exclude Mandatory — accepts: field

Field reference to the ARRAY whose elements are excluded.

Pipeline form (no parameters)

No parameters accepted.

Input type

  • ARRAY

Output type

  • ARRAY

Requires

  • Both inputs must be ARRAY-typed.
  • Pipeline form requires exactly two pipeline inputs.

Examples

Pipeline form

:source, :exclude => Without() => :result

Parameter form

Without(:all_codes, :blocked) => :allowed

Errors

  • `Without': source input must be ARRAY-typed
    The first input value is not an ARRAY at runtime.
  • `Without': exclude input must be ARRAY-typed
    The second input value is not an ARRAY at runtime.
  • `Without' parameters must be field references
    A non-field-reference parameter was supplied.
  • `Without' with no parameters requires exactly two ARRAY pipeline inputs
    The pipeline form was used with the wrong number of inputs.
  • `Without' is only available in new mode
    New mode is not enabled in etl.conf.

See also

Append, Unique, Remove, Size, CartesianOf