Transforms
Transform step: gap_fill
Generates the missing rows in a sequence.
Used inside a transform's steps list as type: gap_fill. See Transforms for the full model.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
name (required) | string | - | - |
type | gap_fill | - | - |
order_by | array of string | - | - |
partition_by | array of string | - | - |
sequence (required) | object | - | - |
sequence.column (required) | string | - | - |
sequence.type (required) | integer or date or datetime or string | - | - |
sequence.expected_values | array of string | - | - |
sequence.step_size | string or integer | - | For sequence.type, see allOf: integer requires non-zero integer step; date and datetime require a non-empty interval string. Categorical string type does not use step_size. |
sequence.start_value | string or number | - | Range lower bound: literal value, or 'min' (minimum seen). |
sequence.end_value | string or number | - | Range upper bound: literal value, 'max' (maximum seen), or 'now' (event-time watermark for date/datetime sequence). |
sequence.fill_strategy | null or forward | null | How to populate non-key columns on synthetic gap rows: 'null' leaves them null; 'forward' carries the last non-null value per partition in order_by sort order (batch) or the latest observed row in the group (streaming). Requires non-empty order_by for forward in batch mode. The step always adds synthetic columns __gf_flag (true on gap rows) and __gf_forward_filled_from (source sequence value when forward-filled). |
state | object | - | Managed cross-batch state for the gap_fill step. Storage is configured at deployment time and is not exposed here. |
state.enabled | boolean | - | Defaults to true. Set false to opt out of managed state for this step. |
state.late_arrival | object | - | Out-of-order tolerance. Set when records may arrive after their event time. |
state.late_arrival.column (required) | string | - | Input column that carries the event time, e.g. 'ts'. |
state.late_arrival.max_latency (required) | string | - | Maximum delay after 'column' the engine will accept before treating a record as too late, e.g. '10 minutes', '1 hour', '1 day'. Used as the watermark grace in streaming. |
Required: name, sequence.
Minimal example
A gap_fill step inside a transform:
Code
Related pages
Last modified on