Fill¶
Creates an ARRAY of count copies of value.
Fill(value, count) produces a fresh ARRAY with count identical
elements, each a copy of value. Both parameters may be scalar literals
or field references to scalar pipeline values; count must resolve to
an integer. A non-positive count yields an empty ARRAY.
Typical use is constructing a base array of a known length that is then
combined with other arrays via Append, ReplaceAt, or similar
array-aware rules.
Available in new mode only.
Parameters¶
- 1 —
valueMandatory — accepts: BOOLEAN, DATE, FLOAT, INT, STRING, NULL, field -
The element value. Each output element is an independent copy of this value.
- 2 —
countMandatory — accepts: INT, field -
Number of elements to produce. Negative values are clamped to zero, yielding an empty
ARRAY.
Input type¶
Output type¶
ARRAY
Requires¶
countmust resolve to an integer at runtime.
Examples¶
Build a base ARRAY then append a sentinel (test094)
Pre-populate strings of a fixed length
Errors¶
-
`Fill': count must be an integer- The
countparameter resolved to a non-integer value at runtime.
-
`Fill': second parameter (count) must be an integer- Parse-time type check rejected a non-integer count parameter.
-
`Fill' requires exactly two parameters- Wrong arity.
-
`Fill' is only available in new mode- New mode is not enabled in
etl.conf.