DESCRIBE()

All functions > METADATA > DESCRIBE()

Returns catalog and type metadata for an expression as a typed ROW.

Signatures

Returns: Metadata fields; nested bags are JSON VARCHAR when present

DESCRIBE(expr: T) → ROW(name VARCHAR, type VARCHAR, entity VARCHAR, unit VARCHAR, description VARCHAR, status VARCHAR, attributes VARCHAR, presentation VARCHAR, inputs VARCHAR, dependencies VARCHAR, formula VARCHAR, literal_status VARCHAR, grain VARCHAR, additivity VARCHAR, determined_by VARCHAR)
sql
ParameterTypeRequiredDescription
exprTYesExpression or feature to describe

Notes

  • Works on any expression (literals become unnamed features)
  • type matches TYPEOF(expr) (FeatureQL type string)
  • entity and unit come from the inferred type (and feature unit spelling when authored)
  • name, description, status, attributes, and presentation are filled for named features; NULL for unnamed expressions
  • attributes and presentation are JSON objects serialized as VARCHAR when non-empty
  • inputs is a JSON array of direct upstream INPUT feature names (empty → NULL)
  • dependencies is a JSON object of name → DAG layer from the compiler graph (empty → NULL)
  • formula is the FeatureQL formula text (feature.formula or pretty-printed expression); may be NULL if formatting fails
  • literal_status is LITERAL, LITERAL_COMPUTED, or NOT_LITERAL when classified; NULL if unavailable
  • grain is JSON direct_grain (empty array when scalar)
  • additivity and determined_by come from the semantic profile
  • Distinct from the DESCRIBE feature; statement, which returns a JSON cell of compiler fields

See also

Examples

Literals

FeatureQL
RETURN
    -- Type field matches TYPEOF
    f1 := DESCRIBE(1)[type],
    -- Unnamed expressions have no catalog name
    f2 := DESCRIBE(1)[name]
;
Result
f1 VARCHARf2 VARCHAR
BIGINTNULL