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
| Parameter | Type | Required | Description |
|---|---|---|---|
expr | T | Yes | Expression or feature to describe |
Notes
- Works on any expression (literals become unnamed features)
typematchesTYPEOF(expr)(FeatureQL type string)entityandunitcome from the inferred type (and feature unit spelling when authored)name,description,status,attributes, andpresentationare filled for named features; NULL for unnamed expressionsattributesandpresentationare JSON objects serialized as VARCHAR when non-emptyinputsis a JSON array of direct upstreamINPUTfeature names (empty → NULL)dependenciesis a JSON object of name → DAG layer from the compiler graph (empty → NULL)formulais the FeatureQL formula text (feature.formulaor pretty-printed expression); may be NULL if formatting failsliteral_statusisLITERAL,LITERAL_COMPUTED, orNOT_LITERALwhen classified; NULL if unavailablegrainis JSONdirect_grain(empty array when scalar)additivityanddetermined_bycome 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 VARCHAR | f2 VARCHAR |
|---|---|
| BIGINT | NULL |
On this page