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/06/20 10:08:10