INPUT()

All functions > CORE > INPUT()

Returns a reference to an input.

Signatures

Returns: An INPUT marker of the specified type

INPUT(type: DataTypeEnum.TYPE) → INPUT
sql
ParameterTypeRequiredDescription
typeDataTypeEnum.TYPEYesThe data type of the input parameter

Notes

  • Defines an input parameter for a feature
  • Input parameters allow features to be parameterized
  • The type parameter specifies what kind of value is expected
  • Used in feature definitions that accept runtime parameters
  • Enables reusable, parameterized feature logic
  • Part of the FeatureMesh core system

Examples

INPUT() with ENTITY and FOR / BIND (2-types.slt)

FeatureQL
WITH
    entity1 := ENTITY(),
    entity2 := ENTITY(),
    entity1_id := INPUT(BIGINT#ENTITY1)
SELECT
    entity1_id,
    plain_id := UNSAFE_CAST(entity1_id AS BIGINT),
    key_for_entity2 := UNSAFE_CAST(entity1_id AS BIGINT#ENTITY2),
    t_annotated := TYPEOF(entity1_id),
    t_plain := TYPEOF(plain_id),
    t_remapped := TYPEOF(key_for_entity2),
    next_annotated_id := UNSAFE_CAST(
        UNSAFE_CAST(entity1_id AS BIGINT) + 1 AS BIGINT#ENTITY1
    ),
    t_next := TYPEOF(next_annotated_id)
FOR
    entity1_id := BIND_VALUES(SEQUENCE(1, 3))
;
Result
ENTITY1_ID BIGINTPLAIN_ID BIGINTKEY_FOR_ENTITY2 BIGINTT_ANNOTATED VARCHART_PLAIN VARCHART_REMAPPED VARCHARNEXT_ANNOTATED_ID BIGINTT_NEXT VARCHAR
111BIGINT#ENTITY1BIGINTBIGINT#ENTITY22BIGINT#ENTITY1
222BIGINT#ENTITY1BIGINTBIGINT#ENTITY23BIGINT#ENTITY1
333BIGINT#ENTITY1BIGINTBIGINT#ENTITY24BIGINT#ENTITY1

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