BIND_COLUMNS()

All functions > CORE > BIND_COLUMNS()

Binds columns from a table to the given features.

Signatures

Returns: A table with the selected columns bound to features

BIND_COLUMNS(columns: ARRAY<VARCHAR>, source_type: VARCHAR, source_content: VARCHAR) → TABLE<T>
sql
ParameterTypeRequiredDescription
columnsARRAY<VARCHAR>YesArray of column names to select from the source
source_typeVARCHARYesType of source: TABLE, SQL, CSV, TSV, or JSON
source_contentVARCHARYesThe source content (table name, SQL query, CSV text, TSV text, or JSON text)

Notes

  • Binds specific columns from a source to features
  • Supports multiple source types: TABLE(name), SQL(query), CSV(data), TSV(data), JSON(data)
  • Column names are mapped to feature names in order
  • Provides a simpler alternative to BIND_SQL for basic selections
  • The number of columns must match the number of features
  • Part of the FeatureMesh binding system

Examples

Bind INPUTs from physical table columns (with setup in same .slt file)

FeatureQL
WITH
    INPUT1 := INPUT(BIGINT),
    INPUT2 := INPUT(BIGINT),
    ADD_INPUTS := INPUT1 + INPUT2,
SELECT
    INPUT1,
    INPUT2,
    ADD_INPUTS,
FOR
    (INPUT1, INPUT2) := BIND_COLUMNS(val1, val2 FROM TABLE(bnd.table_example)),
Result
INPUT1 BIGINTINPUT2 BIGINTADD_INPUTS BIGINT
224
347
4610

Last update at: 2026/05/26 17:22:09