CREATE / RECOMPILE / DROP VIEW
CREATE VIEW persists a compiled SQL relation from a relational FeatureQL body. RECOMPILE VIEW recompiles the stored body. DROP VIEW removes the view feature.
Conceptual workflow: Persisted views . Integration overview: Query from third-party clients .
CREATE VIEW
CREATE [OR REPLACE] VIEW FMV.schema.table AS query
The name is exactly three identifiers and must start with FMV. (UE/VIEW-NAME-NOT-THREE-LEVEL, UE/VIEW-NAME-NOT-FMV).
The body is one relational FeatureQL query. It may name FM. features, KEYSETs, and physical tables. It must not name another view (UE/VIEW-NOT-A-FEATUREQL-SOURCE).
Create, replace, and recompile compile every backend atomically (DuckDB, Trino, serving, Postgres, Snowflake, Databricks, BigQuery, ClickHouse, and MySQL, where a view holding ARRAY or ROW values keeps its refusal and raises it when read there). Compiler warnings fail the statement unless the body contains the matching ACK-XXXX comment. Acknowledgments never suppress errors.
CREATE VIEW on an existing view, or CREATE OR REPLACE VIEW over a non-view at the same name, is UE/VIEW-ALREADY-EXISTS.
RECOMPILE VIEW
RECOMPILE VIEW FMV.schema.table
Recompiles the stored authored body. Does not materialize rows. The stored ACK-XXXX comment still applies. A failed recompile leaves the prior artifacts.
DROP VIEW
DROP VIEW [IF EXISTS] FMV.schema.table
IF EXISTS is silent when the name is absent. Dropping a view that SQL still names is UE/VIEW-NOT-FOUND at scan time.
DESCRIBE fields
FUNCTION is "VIEW". View-only DESCRIBE (FIELDS (…)) names:
| Field | Meaning |
|---|---|
VIEW_COLUMNS | Published output names, authored RETURN order |
VIEW_HIDDEN_COLUMNS | Compiled dependencies that are not published columns |
VIEW_NESTED_BINDS | Nested / RELATED binding inputs frozen into the snapshot |
VIEW_BIND_PARAMS | Frozen KEYSET / bind parameters (uppercase FeatureQL identifiers) |
VIEW_BACKENDS | duckdb, trino, serving, postgres, snowflake, databricks, bigquery, clickhouse, mysql |
VIEW_ACKNOWLEDGED_WARNINGS | ACK-XXXX tokens taken from the stored body |
See DESCRIBE .