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 |