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

ParameterTypeRequiredDescription
baseROWYesBase row or array of rows to add fields to
featuresARRAYFEATUREYesArray of features to compute and add as fields
as_fieldsARRAYFIELDYesArray of field names for the new features
binding_fieldsARRAYFIELDYesArray of field names from base to bind to features
binding_featuresARRAYFEATUREYesArray of feature names to bind the fields to
catalogARRAYFEATUREYesFeature 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
Last update at: 2025/10/13 10:23:46