BIND_VALUE()
All functions > CORE > BIND_VALUE()
Binds the given value to the given feature.
Signatures
Returns: The bound value
BIND_VALUE(value: T) → T sql
| Parameter | Type | Required | Description |
|---|---|---|---|
value | T | Yes | The value to bind to the feature |
Notes
- Associates a scalar value with a feature in the feature mesh
- Used to create feature bindings from single values
- The value can be of any expression type
- Returns the same value that was provided
- Primarily used in feature definition and materialization
- Part of the FeatureMesh binding system
Examples
Single-value FOR bindings (see also binding_inputs doc suite)
FeatureQL
WITH
name := INPUT(VARCHAR), -- Declare an input of type VARCHAR
hello := 'Hello, ' || name || '!',
number := INPUT(BIGINT), -- Declare an input of type BIGINT
other_number := number * 2
SELECT
name,
hello,
number,
other_number
FOR CROSS
name := BIND_VALUE('FeatureQL'),
number := BIND_VALUE(5)
;Result
| NAME VARCHAR | HELLO VARCHAR | NUMBER BIGINT | OTHER_NUMBER BIGINT |
|---|---|---|---|
| FeatureQL | Hello, FeatureQL! | 5 | 10 |