ADD_FIELDS
All functions > ROW > ADD_FIELDS
Adds computed feature fields to a base row or array of rows with field bindings
Syntax
ADD_FIELDS(base, features, as_fields, binding_fields, binding_features, catalog)
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
base | ROW | Yes | Base row or array of rows to add fields to |
features | ARRAYFEATURE | Yes | Array of features to compute and add as fields |
as_fields | ARRAYFIELD | Yes | Array of field names for the new features |
binding_fields | ARRAYFIELD | Yes | Array of field names from base to bind to features |
binding_features | ARRAYFEATURE | Yes | Array of feature names to bind the fields to |
catalog | ARRAYFEATURE | Yes | Feature catalog for resolving feature definitions |
Returns
ROW or ARRAY[ROW] - Base with additional computed fields
Notes
- Allows adding computed features as new fields to existing rows
- BINDING clause maps base fields to feature inputs
- Features are computed using the bound field values
- Works with both single rows and arrays of rows
- New field names must not conflict with existing fields